Get on Workspace auto load full data

This commit is contained in:
mr
2024-07-26 10:36:23 +02:00
parent d5c5b454f4
commit 6c83e54d37
15 changed files with 129 additions and 70 deletions

View File

@@ -3,12 +3,11 @@ package data
import (
"encoding/json"
resources "cloud.o-forge.io/core/oc-lib/models/resources"
"cloud.o-forge.io/core/oc-lib/models/utils"
)
type DataResource struct {
resources.AbstractResource
utils.AbstractResource
Protocols []string `json:"protocol,omitempty" bson:"protocol,omitempty"` //TODO Enum type
DataType string `json:"datatype,omitempty" bson:"datatype,omitempty"`
Example string `json:"example,omitempty" bson:"example,omitempty" description:"base64 encoded data"`

View File

@@ -3,7 +3,6 @@ package data
import (
"testing"
resources "cloud.o-forge.io/core/oc-lib/models/resources"
"cloud.o-forge.io/core/oc-lib/models/utils"
"github.com/stretchr/testify/assert"
@@ -11,7 +10,7 @@ import (
func TestStoreOneData(t *testing.T) {
d := DataResource{DataType: "jpeg", Example: "123456",
AbstractResource: resources.AbstractResource{
AbstractResource: utils.AbstractResource{
AbstractObject: utils.AbstractObject{Name: "testData"},
Description: "Lorem Ipsum",
Logo: "azerty.com",
@@ -29,7 +28,7 @@ func TestStoreOneData(t *testing.T) {
func TestLoadOneDate(t *testing.T) {
d := DataResource{DataType: "jpeg", Example: "123456",
AbstractResource: resources.AbstractResource{
AbstractResource: utils.AbstractResource{
AbstractObject: utils.AbstractObject{Name: "testData"},
Description: "Lorem Ipsum",
Logo: "azerty.com",