rebrand oc-datacenter in oc-compute

This commit is contained in:
mr
2024-11-07 11:05:24 +01:00
parent d249bcdf94
commit 1d6b9db5f9
18 changed files with 121 additions and 93 deletions

View File

@@ -28,6 +28,18 @@ func (dma StorageType) ToArgo() string {
return argoType[dma]
}
// enum of a data type
type StorageType string
const (
FILE = "file"
STREAM = "stream"
API = "api"
DATABASE = "database"
S3 = "s3"
MEMORY = "memory"
HARDWARE = "hardware"
)
/*
* StorageResource is a struct that represents a storage resource
* it defines the resource storage
@@ -35,6 +47,7 @@ func (dma StorageType) ToArgo() string {
type StorageResource struct {
resource_model.AbstractResource // AbstractResource contains the basic fields of an object (id, name)
resource_model.WebResource
Type DataType `bson:"type,omitempty" json:"type,omitempty"` // Type is the type of the storage
Acronym string `bson:"acronym,omitempty" json:"acronym,omitempty"` // Acronym is the acronym of the storage
SizeType StorageType `bson:"size_type" json:"size_type" default:"0"` // SizeType is the type of the storage size
Size uint `bson:"size,omitempty" json:"size,omitempty"` // Size is the size of the storage