test *
This commit is contained in:
@@ -14,6 +14,8 @@ type DataResource struct {
|
||||
Example string `json:"example" bson:"example" required:"true" validate:"required" description:"base64 encoded data"`
|
||||
}
|
||||
|
||||
func (d *DataResource) BindID(id string) {}
|
||||
|
||||
func (dma *DataResource) Deserialize(j map[string]interface{}) utils.DBObject {
|
||||
b, err := json.Marshal(j)
|
||||
if err != nil {
|
||||
|
||||
@@ -37,6 +37,8 @@ type DatacenterGpuModel struct {
|
||||
TensorCores uint `bson:"tensor_cores,omitempty" json:"tensor_cores,omitempty"`
|
||||
}
|
||||
|
||||
func (d *DatacenterResource) BindID(id string) {}
|
||||
|
||||
func (dma *DatacenterResource) Deserialize(j map[string]interface{}) utils.DBObject {
|
||||
b, err := json.Marshal(j)
|
||||
if err != nil {
|
||||
|
||||
@@ -31,6 +31,8 @@ type ExecutionRequirementsModel struct {
|
||||
DiskIO string `bson:"disk_io,omitempty" json:"disk_io,omitempty"`
|
||||
}
|
||||
|
||||
func (d *ProcessingResource) BindID(id string) {}
|
||||
|
||||
func (dma *ProcessingResource) Deserialize(j map[string]interface{}) utils.DBObject {
|
||||
b, err := json.Marshal(j)
|
||||
if err != nil {
|
||||
|
||||
@@ -24,6 +24,8 @@ type StorageResource struct {
|
||||
BookingPrice uint `bson:"booking_price,omitempty" json:"booking_price,omitempty"`
|
||||
}
|
||||
|
||||
func (d *StorageResource) BindID(id string) {}
|
||||
|
||||
func (dma *StorageResource) Deserialize(j map[string]interface{}) utils.DBObject {
|
||||
b, err := json.Marshal(j)
|
||||
if err != nil {
|
||||
|
||||
@@ -57,6 +57,8 @@ type WorkflowResource struct {
|
||||
WorkflowID string `bson:"workflow_id,omitempty" json:"workflow_id,omitempty"`
|
||||
}
|
||||
|
||||
func (d *WorkflowResource) BindID(id string) { d.WorkflowID = id }
|
||||
|
||||
func (d *WorkflowResource) GetAccessor() utils.Accessor {
|
||||
data := &WorkflowResourceMongoAccessor{}
|
||||
data.SetLogger(utils.WORKFLOW_RESOURCE)
|
||||
|
||||
Reference in New Issue
Block a user