Live Structure

This commit is contained in:
mr
2025-06-24 11:29:04 +02:00
parent 2c8dcbe93d
commit cd177bd779
21 changed files with 350 additions and 209 deletions

View File

@@ -17,7 +17,11 @@ type ResourceMongoAccessor[T ResourceInterface] struct {
// New creates a new instance of the computeMongoAccessor
func NewAccessor[T ResourceInterface](t tools.DataType, request *tools.APIRequest, g func() utils.DBObject) *ResourceMongoAccessor[T] {
if !slices.Contains([]tools.DataType{tools.COMPUTE_RESOURCE, tools.STORAGE_RESOURCE, tools.PROCESSING_RESOURCE, tools.WORKFLOW_RESOURCE, tools.DATA_RESOURCE}, t) {
if !slices.Contains([]tools.DataType{
tools.COMPUTE_RESOURCE, tools.STORAGE_RESOURCE,
tools.PROCESSING_RESOURCE, tools.WORKFLOW_RESOURCE,
tools.DATA_RESOURCE,
}, t) {
return nil
}
return &ResourceMongoAccessor[T]{