31 lines
901 B
Go
31 lines
901 B
Go
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()
|
|
ConvertToPricedResource(t tools.DataType, request *tools.APIRequest) pricing.PricedItemITF
|
|
SetAllowedInstances(request *tools.APIRequest)
|
|
SetResourceModel(model *resource_model.ResourceModel)
|
|
}
|
|
|
|
type ResourceInstanceITF interface {
|
|
GetID() string
|
|
GetName() string
|
|
GetPricingsProfiles(peerID string, groups []string) []pricing.PricingProfileITF
|
|
GetPeerGroups() ([]ResourcePartnerITF, []map[string][]string)
|
|
ClearPeerGroups()
|
|
}
|
|
|
|
type ResourcePartnerITF interface {
|
|
GetPricingsProfiles(peerID string, groups []string) []pricing.PricingProfileITF
|
|
GetPeerGroups() map[string][]string
|
|
ClearPeerGroups()
|
|
}
|