19 lines
766 B
Go
19 lines
766 B
Go
package resources
|
|
|
|
import (
|
|
"cloud.o-forge.io/core/oc-lib/models/resources/resource_model"
|
|
"cloud.o-forge.io/core/oc-lib/models/utils"
|
|
"cloud.o-forge.io/core/oc-lib/tools"
|
|
)
|
|
|
|
// WorkflowResource is a struct that represents a workflow resource
|
|
// it defines the resource workflow
|
|
type WorkflowResource struct {
|
|
resource_model.AbstractResource
|
|
WorkflowID string `bson:"workflow_id,omitempty" json:"workflow_id,omitempty"` // WorkflowID is the ID of the native workflow
|
|
}
|
|
|
|
func (d *WorkflowResource) GetAccessor(peerID string, groups []string, caller *tools.HTTPCaller) utils.Accessor {
|
|
return New[*WorkflowResource](tools.WORKFLOW_RESOURCE, peerID, groups, caller, func() utils.DBObject { return &WorkflowResource{} }) // Create a new instance of the accessor
|
|
}
|