Addon
This commit is contained in:
@@ -14,6 +14,9 @@ type ResourceSet struct {
|
||||
NativeTool []string `bson:"native,omitempty" json:"native,omitempty"`
|
||||
Services []string `bson:"services,omitempty" json:"services,omitempty"`
|
||||
|
||||
// DynamicResources are stored inline — no DB collection, resolved at runtime via SetAllowedInstances.
|
||||
DynamicResources []*DynamicResource `bson:"dynamic_resources,omitempty" json:"dynamic_resources,omitempty"`
|
||||
|
||||
DataResources []*DataResource `bson:"-" json:"data_resources,omitempty"`
|
||||
StorageResources []*StorageResource `bson:"-" json:"storage_resources,omitempty"`
|
||||
ProcessingResources []*ProcessingResource `bson:"-" json:"processing_resources,omitempty"`
|
||||
@@ -62,6 +65,9 @@ func (r *ResourceSet) Fill(request *tools.APIRequest) {
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, d := range r.DynamicResources {
|
||||
d.SetAllowedInstances(request)
|
||||
}
|
||||
}
|
||||
|
||||
type ItemResource struct {
|
||||
@@ -72,4 +78,5 @@ type ItemResource struct {
|
||||
Workflow *WorkflowResource `bson:"workflow,omitempty" json:"workflow,omitempty"`
|
||||
NativeTool *NativeTool `bson:"native_tools,omitempty" json:"native_tools,omitempty"`
|
||||
Service *ServiceResource `bson:"service,omitempty" json:"service,omitempty"`
|
||||
Dynamic *DynamicResource `bson:"dynamic,omitempty" json:"dynamic,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user