inspect search bug

This commit is contained in:
mr 2025-01-17 10:07:37 +01:00
parent 7d11c23eba
commit b990fe42d3
4 changed files with 7 additions and 12 deletions

View File

@ -19,7 +19,7 @@ import (
type ComputeResource struct {
AbstractIntanciatedResource[*ComputeResourceInstance]
Architecture string `json:"architecture,omitempty" bson:"architecture,omitempty"` // Architecture is the architecture
Infrastructure enum.InfrastructureType `json:"infrastructure,omitempty" bson:"infrastructure,omitempty"`
Infrastructure enum.InfrastructureType `json:"infrastructure" bson:"infrastructure" default:"-1"` // Infrastructure is the infrastructure
}
func (d *ComputeResource) GetAccessor(request *tools.APIRequest) utils.Accessor {

View File

@ -26,7 +26,7 @@ type ProcessingUsage struct {
*/
type ProcessingResource struct {
AbstractIntanciatedResource[*ResourceInstance[*ResourcePartnerShip[*ProcessingResourcePricingProfile]]]
Infrastructure enum.InfrastructureType `json:"infrastructure,omitempty" bson:"infrastructure,omitempty"`
Infrastructure enum.InfrastructureType `json:"infrastructure" bson:"infrastructure" default:"-1"` // Infrastructure is the infrastructure
IsService bool `json:"is_service,omitempty" bson:"is_service,omitempty"` // IsService is a flag that indicates if the processing is a service
Usage *ProcessingUsage `bson:"usage,omitempty" json:"usage,omitempty"` // Usage is the usage of the processing
OpenSource bool `json:"open_source" bson:"open_source" default:"false"`

View File

@ -16,7 +16,7 @@ import (
*/
type StorageResource struct {
AbstractIntanciatedResource[*StorageResourceInstance] // AbstractResource contains the basic fields of an object (id, name)
StorageType enum.StorageType `bson:"storage_type,omitempty" json:"storage_type,omitempty"` // Type is the type of the storage
StorageType enum.StorageType `bson:"storage_type" json:"storage_type" default:"-1"` // Type is the type of the storage
Acronym string `bson:"acronym,omitempty" json:"acronym,omitempty"` // Acronym is the acronym of the storage
}

View File

@ -6,18 +6,13 @@ import (
"cloud.o-forge.io/core/oc-lib/tools"
)
// we don't have any information about the accessor
type abstractWorkflowResource struct {
WorkflowID string `bson:"workflow_id,omitempty" json:"workflow_id,omitempty"` // WorkflowID is the ID of the native workflow
}
type WorkflowResourcePricingProfile struct{}
// WorkflowResource is a struct that represents a workflow resource
// it defines the resource workflow
type WorkflowResource struct {
AbstractResource
abstractWorkflowResource
WorkflowID string `bson:"workflow_id,omitempty" json:"workflow_id,omitempty"` // WorkflowID is the ID of the native workflow
}
func (d *WorkflowResource) GetAccessor(request *tools.APIRequest) utils.Accessor {