Documentation ¶
Index ¶
- func FromInt(i int) string
- func New(t tools.DataType, username string, peerID string, groups []string, ...) *workflowExecutionMongoAccessor
- type ScheduledType
- type WorkflowExecution
- func (wfa *WorkflowExecution) ArgoStatusToState(status string) *WorkflowExecution
- func (wfa *WorkflowExecution) Equals(we *WorkflowExecution) bool
- func (r *WorkflowExecution) GenerateID()
- func (d *WorkflowExecution) GetAccessor(username string, peerID string, groups []string, caller *tools.HTTPCaller) utils.Accessor
- func (d *WorkflowExecution) GetName() string
- func (d *WorkflowExecution) VerifyAuth(username string, peerID string, groups []string) bool
- type WorkflowExecutions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ScheduledType ¶
type ScheduledType int
ScheduledType - Enum for the different states of a workflow execution
const ( SCHEDULED ScheduledType = iota + 1 STARTED FAILURE SUCCESS FORGOTTEN )
func (ScheduledType) EnumIndex ¶
func (d ScheduledType) EnumIndex() int
EnumIndex - Creating common behavior - give the type a EnumIndex functio
func (ScheduledType) String ¶
func (d ScheduledType) String() string
type WorkflowExecution ¶
type WorkflowExecution struct { utils.AbstractObject // AbstractObject contains the basic fields of an object (id, name) ExecDate *time.Time `json:"execution_date,omitempty" bson:"execution_date,omitempty" validate:"required"` // ExecDate is the execution date of the workflow, is required EndDate *time.Time `json:"end_date,omitempty" bson:"end_date,omitempty"` // EndDate is the end date of the workflow State ScheduledType `json:"state" bson:"state" default:"0"` // State is the state of the workflow WorkflowID string `json:"workflow_id" bson:"workflow_id,omitempty"` // WorkflowID is the ID of the workflow }
* WorkflowExecution is a struct that represents a workflow execution * Warning: No user can write (del, post, put) a workflow execution, it is only used by the system * workflows generate their own executions
func (*WorkflowExecution) ArgoStatusToState ¶
func (wfa *WorkflowExecution) ArgoStatusToState(status string) *WorkflowExecution
tool to transform the argo status to a state
func (*WorkflowExecution) Equals ¶
func (wfa *WorkflowExecution) Equals(we *WorkflowExecution) bool
func (*WorkflowExecution) GenerateID ¶
func (r *WorkflowExecution) GenerateID()
func (*WorkflowExecution) GetAccessor ¶
func (d *WorkflowExecution) GetAccessor(username string, peerID string, groups []string, caller *tools.HTTPCaller) utils.Accessor
func (*WorkflowExecution) GetName ¶
func (d *WorkflowExecution) GetName() string
func (*WorkflowExecution) VerifyAuth ¶
func (d *WorkflowExecution) VerifyAuth(username string, peerID string, groups []string) bool
type WorkflowExecutions ¶
type WorkflowExecutions struct { WorkflowID string `json:"workflow_id" bson:"workflow_id"` ResourceID string `json:"resource_id" bson:"resource_id"` Executions []*WorkflowExecution `json:"executions" bson:"executions"` }
* WorkflowExecutions is a struct that represents a list of workflow executions * Warning: No user can write (del, post, put) a workflow execution, it is only used by the system * workflows generate their own executions
func (*WorkflowExecutions) Deserialize ¶
func (dma *WorkflowExecutions) Deserialize(j map[string]interface{}) *WorkflowExecutions
New - Creates a new instance of the WorkflowExecutions from a map
func (*WorkflowExecutions) Serialize ¶
func (dma *WorkflowExecutions) Serialize() map[string]interface{}
Serialize - Returns the WorkflowExecutions as a map