oc-lib/models/resources/interfaces.go

31 lines
901 B
Go
Raw Normal View History

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
SetAllowedInstances(request *tools.APIRequest)
SetResourceModel(model *resource_model.ResourceModel)
}
2025-01-13 11:24:07 +01:00
type ResourceInstanceITF interface {
GetID() string
2025-01-13 11:24:07 +01:00
GetName() string
GetPricingsProfiles(peerID string, groups []string) []pricing.PricingProfileITF
GetPeerGroups() ([]ResourcePartnerITF, []map[string][]string)
ClearPeerGroups()
}
type ResourcePartnerITF interface {
2025-01-13 11:24:07 +01:00
GetPricingsProfiles(peerID string, groups []string) []pricing.PricingProfileITF
GetPeerGroups() map[string][]string
ClearPeerGroups()
}