some
This commit is contained in:
@@ -116,7 +116,5 @@ func (d *WorkflowExecution) GetName() string {
|
||||
}
|
||||
|
||||
func (d *WorkflowExecution) GetAccessor(peerID string, groups []string, caller *tools.HTTPCaller) utils.Accessor {
|
||||
data := New() // Create a new instance of the accessor
|
||||
data.Init(tools.WORKFLOW_EXECUTION, peerID, groups, caller) // Initialize the accessor with the WORKFLOW_EXECUTION model type
|
||||
return data
|
||||
return New(tools.WORKFLOW_EXECUTION, peerID, groups, caller) // Create a new instance of the accessor
|
||||
}
|
||||
|
@@ -5,15 +5,25 @@ import (
|
||||
|
||||
"cloud.o-forge.io/core/oc-lib/dbs"
|
||||
"cloud.o-forge.io/core/oc-lib/dbs/mongo"
|
||||
"cloud.o-forge.io/core/oc-lib/logs"
|
||||
"cloud.o-forge.io/core/oc-lib/models/utils"
|
||||
"cloud.o-forge.io/core/oc-lib/tools"
|
||||
)
|
||||
|
||||
type workflowExecutionMongoAccessor struct {
|
||||
utils.AbstractAccessor
|
||||
}
|
||||
|
||||
func New() *workflowExecutionMongoAccessor {
|
||||
return &workflowExecutionMongoAccessor{}
|
||||
func New(t tools.DataType, peerID string, groups []string, caller *tools.HTTPCaller) *workflowExecutionMongoAccessor {
|
||||
return &workflowExecutionMongoAccessor{
|
||||
utils.AbstractAccessor{
|
||||
Logger: logs.CreateLogger(t.String()), // Create a logger with the data type
|
||||
Caller: caller,
|
||||
PeerID: peerID,
|
||||
Groups: groups, // Set the caller
|
||||
Type: t.String(),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func (wfa *workflowExecutionMongoAccessor) DeleteOne(id string) (utils.DBObject, int, error) {
|
||||
|
Reference in New Issue
Block a user