2024-12-12 16:25:47 +01:00
|
|
|
package resources
|
|
|
|
|
|
|
|
import (
|
|
|
|
"cloud.o-forge.io/core/oc-lib/models/common/pricing"
|
|
|
|
"cloud.o-forge.io/core/oc-lib/models/resources/resource_model"
|
|
|
|
"cloud.o-forge.io/core/oc-lib/models/utils"
|
|
|
|
"cloud.o-forge.io/core/oc-lib/tools"
|
|
|
|
)
|
|
|
|
|
|
|
|
type ResourceInterface interface {
|
|
|
|
utils.DBObject
|
|
|
|
Trim()
|
2025-01-13 11:24:07 +01:00
|
|
|
ConvertToPricedResource(t tools.DataType, request *tools.APIRequest) pricing.PricedItemITF
|
2024-12-12 16:25:47 +01:00
|
|
|
SetAllowedInstances(request *tools.APIRequest)
|
|
|
|
SetResourceModel(model *resource_model.ResourceModel)
|
|
|
|
}
|
|
|
|
|
2025-01-13 11:24:07 +01:00
|
|
|
type ResourceInstanceITF interface {
|
2024-12-12 16:25:47 +01:00
|
|
|
GetID() string
|
2025-01-13 11:24:07 +01:00
|
|
|
GetName() string
|
|
|
|
GetPricingsProfiles(peerID string, groups []string) []pricing.PricingProfileITF
|
2024-12-12 16:25:47 +01:00
|
|
|
GetPeerGroups() ([]ResourcePartnerITF, []map[string][]string)
|
|
|
|
ClearPeerGroups()
|
|
|
|
}
|
|
|
|
|
|
|
|
type ResourcePartnerITF interface {
|
2025-01-13 11:24:07 +01:00
|
|
|
GetPricingsProfiles(peerID string, groups []string) []pricing.PricingProfileITF
|
2024-12-12 16:25:47 +01:00
|
|
|
GetPeerGroups() map[string][]string
|
|
|
|
ClearPeerGroups()
|
|
|
|
}
|