massive draft for payment process (UNCOMPLETE)
This commit is contained in:
47
models/resources/interfaces.go
Normal file
47
models/resources/interfaces.go
Normal file
@@ -0,0 +1,47 @@
|
||||
package resources
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"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 ShallowResourceInterface interface {
|
||||
utils.DBObject
|
||||
GetType() tools.DataType
|
||||
GetCreatorID() string
|
||||
GetPricingID() string
|
||||
GetLocationStart() *time.Time
|
||||
GetLocationEnd() *time.Time
|
||||
GetExplicitDurationInS() float64
|
||||
SetStartUsage(start time.Time)
|
||||
SetEndUsage(end time.Time)
|
||||
GetPartnership(request *tools.APIRequest) ResourcePartnerITF
|
||||
SetResourceModel(model *resource_model.ResourceModel)
|
||||
}
|
||||
|
||||
type ResourceInterface interface {
|
||||
utils.DBObject
|
||||
Trim()
|
||||
GetCreatorID() string
|
||||
VerifyPartnerships() bool
|
||||
GetPartnership(request *tools.APIRequest) ResourcePartnerITF
|
||||
SetAllowedInstances(request *tools.APIRequest)
|
||||
SetResourceModel(model *resource_model.ResourceModel)
|
||||
}
|
||||
|
||||
type InstanceITF interface {
|
||||
GetID() string
|
||||
VerifyPartnerships() bool
|
||||
GetPeerGroups() ([]ResourcePartnerITF, []map[string][]string)
|
||||
ClearPeerGroups()
|
||||
}
|
||||
|
||||
type ResourcePartnerITF interface {
|
||||
GetPricing(id string) pricing.PricingProfileITF
|
||||
GetPeerGroups() map[string][]string
|
||||
ClearPeerGroups()
|
||||
}
|
||||
Reference in New Issue
Block a user