From 6e5c873796490920193d7b8043f2f5bda9fbc149 Mon Sep 17 00:00:00 2001 From: mr Date: Mon, 13 Jan 2025 13:48:12 +0100 Subject: [PATCH] add exec --- models/resources/resource.go | 14 +++++++------- models/resources/storage.go | 1 - 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/models/resources/resource.go b/models/resources/resource.go index 885f7d1..a56823a 100644 --- a/models/resources/resource.go +++ b/models/resources/resource.go @@ -119,13 +119,13 @@ func verifyAuthAction[T ResourceInstanceITF](baseInstance []T, request *tools.AP } type ResourceInstance[T ResourcePartnerITF] struct { - UUID string `json:"id,omitempty" bson:"id,omitempty"` - Name string `json:"name,omitempty" bson:"name,omitempty"` - Location geopoint.GeoPoint `json:"location,omitempty" bson:"location,omitempty"` - Country countries.CountryCode `json:"country,omitempty" bson:"country,omitempty"` - // Url string `json:"url,omitempty" bson:"url,omitempty"` - AccessProtocol string `json:"access_protocol,omitempty" bson:"access_protocol,omitempty"` - Partnerships []T `json:"partner_resource,omitempty" bson:"partner_resource,omitempty"` + UUID string `json:"id,omitempty" bson:"id,omitempty"` + Name string `json:"name,omitempty" bson:"name,omitempty"` + Location geopoint.GeoPoint `json:"location,omitempty" bson:"location,omitempty"` + Country countries.CountryCode `json:"country,omitempty" bson:"country,omitempty"` + Source string `bson:"source,omitempty" json:"source,omitempty"` // Source is the source of the storage + AccessProtocol string `json:"access_protocol,omitempty" bson:"access_protocol,omitempty"` + Partnerships []T `json:"partner_resource,omitempty" bson:"partner_resource,omitempty"` } func (ri *ResourceInstance[T]) GetID() string { diff --git a/models/resources/storage.go b/models/resources/storage.go index 52758f1..bb96f55 100644 --- a/models/resources/storage.go +++ b/models/resources/storage.go @@ -26,7 +26,6 @@ func (d *StorageResource) GetAccessor(request *tools.APIRequest) utils.Accessor type StorageResourceInstance struct { ResourceInstance[*StorageResourcePartnership] - Source string `bson:"source,omitempty" json:"source,omitempty"` // Source is the source of the storage Local bool `bson:"local" json:"local"` SecurityLevel string `bson:"security_level,omitempty" json:"security_level,omitempty"` SizeType common.StorageSize `bson:"size_type" json:"size_type" default:"0"` // SizeType is the type of the storage size