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

@@ -7,7 +7,20 @@ import (
"cloud.o-forge.io/core/oc-lib/models/utils"
"cloud.o-forge.io/core/oc-lib/tools"
)
// enum of public private or licenced data
type DataLicense string
const (
PUBLIC = "public"
PRIVATE = "private"
LICENCED = "licenced"
)
/*
* Struct of Usage Conditions
*/
type UsageConditions struct {
Usage string `json:"usage,omitempty" bson:"usage,omitempty" description:"usage of the data"` // Usage is the usage of the data
Actors []string `json:"actors,omitempty" bson:"actors,omitempty" description:"actors of the data"` // Actors is the actors of the data
}
/*
* DataResource is a struct that represents a data resource
* it defines the resource data
@@ -15,6 +28,10 @@ import (
type DataResource struct {
resource_model.AbstractResource // AbstractResource contains the basic fields of an object (id, name)
resource_model.WebResource
Type string `bson:"type,omitempty" json:"type,omitempty"` // Type is the type of the storage
UsageConditions UsageConditions `json:"usage_conditions,omitempty" bson:"usage_conditions,omitempty" description:"usage conditions of the data"` // UsageConditions is the usage conditions of the data
License DataLicense `json:"license,omitempty" bson:"license,omitempty" description:"license of the data"` // License is the license of the data
Interest DataLicense `json:"interest,omitempty" bson:"interest,omitempty" description:"interest of the data"` // Interest is the interest of the data
Example string `json:"example,omitempty" bson:"example,omitempty" description:"base64 encoded data"` // Example is an example of the data
}