package resources import ( "cloud.o-forge.io/core/oc-lib/models/resources/data" "cloud.o-forge.io/core/oc-lib/models/resources/datacenter" "cloud.o-forge.io/core/oc-lib/models/resources/processing" "cloud.o-forge.io/core/oc-lib/models/resources/storage" w "cloud.o-forge.io/core/oc-lib/models/resources/workflow" ) // AbstractResource is the struct containing all of the attributes commons to all ressources // Resource is the interface to be implemented by all classes inheriting from Resource to have the same behavior // http://www.inanzzz.com/index.php/post/wqbs/a-basic-usage-of-int-and-string-enum-types-in-golang type ResourceSet struct { Datas []string `bson:"datas,omitempty" json:"datas,omitempty"` Storages []string `bson:"storages,omitempty" json:"storages,omitempty"` Processings []string `bson:"processings,omitempty" json:"processings,omitempty"` Datacenters []string `bson:"datacenters,omitempty" json:"datacenters,omitempty"` Workflows []string `bson:"workflows,omitempty" json:"workflows,omitempty"` DataResources []*data.DataResource `bson:"-" json:"data_resources,omitempty"` StorageResources []*storage.StorageResource `bson:"-" json:"storage_resources,omitempty"` ProcessingResources []*processing.ProcessingResource `bson:"-" json:"processing_resources,omitempty"` DatacenterResources []*datacenter.DatacenterResource `bson:"-" json:"datacenter_resources,omitempty"` WorkflowResources []*w.WorkflowResource `bson:"-" json:"workflow_resources,omitempty"` } type ItemResource struct { Data *data.DataResource `bson:"data,omitempty" json:"data,omitempty"` Processing *processing.ProcessingResource `bson:"processing,omitempty" json:"processing,omitempty"` Storage *storage.StorageResource `bson:"storage,omitempty" json:"storage,omitempty"` Datacenter *datacenter.DatacenterResource `bson:"datacenter,omitempty" json:"datacenter,omitempty"` Workflow *w.WorkflowResource `bson:"workflow,omitempty" json:"workflow,omitempty"` }