Documentation ¶
Index ¶
- Constants
- func AddWorkflowVersionNodeLog(db *sqlx.DB, reference string, workflowVersionNodeId int, ...)
- func ApplyFilters(filters interface{}, data []map[string]interface{}) []interface{}
- func DeserialiseQuery(query interface{}) interface{}
- func GetFilterFunctions() map[FilterCategoryType]map[string]FilterFunc
- func GetTriggerGroupWorkflowVersionNodeId(db *sqlx.DB, workflowVersionNodeId int) (int, error)
- func GetWorkflowIdsByNodeType(db *sqlx.DB, nodeType commons.WorkflowNodeType) ([]int, error)
- func ProcessQuery(filters interface{}, item map[string]interface{}) bool
- func ProcessWorkflowNode(ctx context.Context, db *sqlx.DB, workflowNode WorkflowNode, ...) (map[commons.WorkflowParameterLabel]string, commons.Status, error)
- func RegisterWorkflowRoutes(r *gin.RouterGroup, db *sqlx.DB)
- func StructToMap(structs []channels.ChannelBody) []map[string]interface{}
- type AndClause
- type ChannelPolicyConfiguration
- type Clause
- type ClauseWithResult
- type CreateNodeRequest
- type CreateWorkflowVersionNodeLinkRequest
- type DeleteStageRequest
- type Filter
- type FilterCategoryType
- type FilterClause
- type FilterClauses
- type FilterFunc
- type FilterInterface
- type FilterParameterType
- type LinkVisibilitySettings
- type ModifyTagsParameters
- type OrClause
- type Parameter
- type RebalanceConfiguration
- type SelectOptionType
- type TagAction
- type TagInfo
- type TagParameters
- type TimeTriggerParameters
- type UpdateNodeRequest
- type UpdateWorkflow
- type Workflow
- type WorkflowForest
- type WorkflowNode
- func GetActiveEventTriggerNodes(db *sqlx.DB, nodeType commons.WorkflowNodeType) ([]WorkflowNode, error)
- func GetActiveSortedStageTriggerNodeForWorkflowVersionId(db *sqlx.DB, workflowVersionId int) ([]WorkflowNode, error)
- func GetWorkflowNode(db *sqlx.DB, workflowVersionNodeId int) (WorkflowNode, error)
- type WorkflowNodeParameter
- type WorkflowNodeVisibilitySettings
- type WorkflowPage
- type WorkflowStatus
- type WorkflowTableRow
- type WorkflowToTrigger
- type WorkflowVersion
- type WorkflowVersionNode
- type WorkflowVersionNodeLink
- type WorkflowVersionNodeLinkVisibilitySettings
- type WorkflowVersionNodeLog
- type WorkflowVersionNodeResponse
Constants ¶
View Source
const ( Inactive = WorkflowStatus(commons.Inactive) Active = WorkflowStatus(commons.Active) Deleted = WorkflowStatus(commons.Deleted) )
View Source
const ( TagActionAdd = TagAction(iota) TagActionRemove TagActionToggle )
Variables ¶
This section is empty.
Functions ¶
func ApplyFilters ¶ added in v0.18.1
func ApplyFilters(filters interface{}, data []map[string]interface{}) []interface{}
func DeserialiseQuery ¶ added in v0.18.1
func DeserialiseQuery(query interface{}) interface{}
func GetFilterFunctions ¶ added in v0.18.1
func GetFilterFunctions() map[FilterCategoryType]map[string]FilterFunc
func GetTriggerGroupWorkflowVersionNodeId ¶ added in v0.17.1
func GetWorkflowIdsByNodeType ¶ added in v0.18.1
func ProcessQuery ¶ added in v0.18.1
func ProcessWorkflowNode ¶
func ProcessWorkflowNode(ctx context.Context, db *sqlx.DB, workflowNode WorkflowNode, triggeringWorkflowVersionNodeId int, workflowNodeCache map[int]WorkflowNode, workflowNodeStatus map[int]commons.Status, workflowNodeStagingParametersCache map[int]map[commons.WorkflowParameterLabel]string, reference string, inputs map[commons.WorkflowParameterLabel]string, iteration int, workflowStageExitConfigurationCache map[int]map[commons.WorkflowParameterLabel]string, lightningRequestChannel chan interface{}, rebalanceRequestChannel chan commons.RebalanceRequest) (map[commons.WorkflowParameterLabel]string, commons.Status, error)
ProcessWorkflowNode workflowNodeStagingParametersCache[WorkflowVersionNodeId][parameterLabel] (i.e. parameterLabel = sourceChannels)
func RegisterWorkflowRoutes ¶
func RegisterWorkflowRoutes(r *gin.RouterGroup, db *sqlx.DB)
func StructToMap ¶ added in v0.18.1
func StructToMap(structs []channels.ChannelBody) []map[string]interface{}
Types ¶
type AndClause ¶ added in v0.18.1
func (*AndClause) AddChildClause ¶ added in v0.18.1
type ChannelPolicyConfiguration ¶ added in v0.18.1
type Clause ¶ added in v0.18.1
type Clause struct { Prefix string ChildClauses []Clause Filter FilterInterface Result bool }
type ClauseWithResult ¶ added in v0.18.1
type CreateNodeRequest ¶
type CreateNodeRequest struct { WorkflowVersionId int `json:"workflowVersionId" db:"workflow_version_id"` Name string `json:"name" db:"name"` Type commons.WorkflowNodeType `json:"type" db:"type"` Stage int `json:"stage" db:"stage"` VisibilitySettings WorkflowNodeVisibilitySettings `json:"visibilitySettings" db:"visibility_settings"` Parameters *interface{} `json:"parameters" db:"parameters"` }
type CreateWorkflowVersionNodeLinkRequest ¶
type CreateWorkflowVersionNodeLinkRequest struct { WorkflowVersionId int `json:"workflowVersionId" db:"workflow_version_id"` ParentOutput commons.WorkflowParameterLabel `json:"parentOutput" db:"parent_output"` ParentWorkflowVersionNodeId int `json:"parentWorkflowVersionNodeId" db:"parent_workflow_version_node_id"` ChildInput commons.WorkflowParameterLabel `json:"childInput" db:"child_input"` ChildWorkflowVersionNodeId int `json:"childWorkflowVersionNodeId" db:"child_workflow_version_node_id"` }
type DeleteStageRequest ¶
type FilterCategoryType ¶ added in v0.18.1
type FilterCategoryType string
const ( FilterCategoryTypeNumber FilterCategoryType = "number" FilterCategoryTypeString FilterCategoryType = "string" FilterCategoryTypeDate FilterCategoryType = "date" FilterCategoryTypeBoolean FilterCategoryType = "boolean" FilterCategoryTypeArray FilterCategoryType = "array" FilterCategoryTypeDuration FilterCategoryType = "duration" FilterCategoryTypeEnum FilterCategoryType = "enum" FilterCategoryTypeTag FilterCategoryType = "tag" )
type FilterClause ¶ added in v0.18.1
type FilterClause struct { Prefix string Filter FilterInterface Result bool }
func (*FilterClause) ToJSON ¶ added in v0.18.1
func (f *FilterClause) ToJSON() map[string]interface{}
type FilterClauses ¶ added in v0.18.1
type FilterClauses struct { And []FilterClauses `json:"$and"` Or []FilterClauses `json:"$or"` Filter Filter `json:"$filter"` }
type FilterFunc ¶ added in v0.18.1
type FilterFunc func(input map[string]interface{}, key string, parameter FilterParameterType) bool
type FilterInterface ¶ added in v0.18.1
type FilterInterface struct { Category FilterCategoryType FuncName string Parameter FilterParameterType Key string SelectOptions []SelectOptionType Value interface{} Label string }
type FilterParameterType ¶ added in v0.18.1
type FilterParameterType interface{}
type LinkVisibilitySettings ¶
type ModifyTagsParameters ¶
type RebalanceConfiguration ¶ added in v0.18.1
type SelectOptionType ¶ added in v0.18.1
type TagParameters ¶ added in v0.16.9
type TimeTriggerParameters ¶
type UpdateNodeRequest ¶
type UpdateNodeRequest struct { WorkflowVersionNodeId int `json:"workflowVersionNodeId" db:"workflow_version_node_id"` Name *string `json:"name" db:"name"` Status *WorkflowStatus `json:"status" db:"status"` Parameters *interface{} `json:"parameters" db:"parameters"` VisibilitySettings *WorkflowNodeVisibilitySettings `json:"visibilitySettings" db:"visibility_settings"` }
type UpdateWorkflow ¶
type UpdateWorkflow struct { WorkflowId int `json:"workflowId" db:"workflow_id"` Name *string `json:"name" db:"name"` Status *WorkflowStatus `json:"status" db:"status"` }
type Workflow ¶
type WorkflowForest ¶
type WorkflowForest struct {
SortedStageTrees map[int][]*WorkflowNode `json:"sortedStageTrees"`
}
func GetWorkflowForest ¶
func GetWorkflowForest(db *sqlx.DB, workflowVersionId int) (WorkflowForest, error)
type WorkflowNode ¶
type WorkflowNode struct { WorkflowVersionNodeId int `json:"workflowVersionNodeId"` Name string `json:"name"` Status WorkflowStatus `json:"status"` Stage int `json:"stage"` Type commons.WorkflowNodeType `json:"type"` Parameters interface{} `json:"parameters"` VisibilitySettings WorkflowNodeVisibilitySettings `json:"visibilitySettings"` UpdateOn time.Time `json:"updatedOn"` ParentNodes map[int]*WorkflowNode `json:"parentNodes"` ChildNodes map[int]*WorkflowNode `json:"childNodes"` LinkDetails map[int]WorkflowVersionNodeLink `json:"LinkDetails"` WorkflowVersionId int `json:"workflowVersionId"` }
func GetActiveEventTriggerNodes ¶
func GetActiveEventTriggerNodes(db *sqlx.DB, nodeType commons.WorkflowNodeType) ([]WorkflowNode, error)
func GetActiveSortedStageTriggerNodeForWorkflowVersionId ¶
func GetActiveSortedStageTriggerNodeForWorkflowVersionId(db *sqlx.DB, workflowVersionId int) ([]WorkflowNode, error)
func GetWorkflowNode ¶
func GetWorkflowNode(db *sqlx.DB, workflowVersionNodeId int) (WorkflowNode, error)
GetWorkflowNode is not recursive and only returns direct parent/child relations without further nesting.
type WorkflowNodeParameter ¶
type WorkflowNodeParameter struct { Type commons.WorkflowParameterType `json:"type"` ValueNumber int `json:"valueNumber"` ValueString string `json:"valueString"` }
func (*WorkflowNodeParameter) Scan ¶
func (wp *WorkflowNodeParameter) Scan(val interface{}) (err error)
type WorkflowNodeVisibilitySettings ¶
type WorkflowNodeVisibilitySettings struct { YPosition *int `json:"yPosition" db:"yPosition"` XPosition *int `json:"xPosition" db:"xPosition"` Collapsed *bool `json:"collapsed" db:"collapsed"` }
func (*WorkflowNodeVisibilitySettings) Scan ¶
func (nvs *WorkflowNodeVisibilitySettings) Scan(val interface{}) (err error)
type WorkflowPage ¶
type WorkflowPage struct { Workflow Workflow `json:"workflow"` Version WorkflowVersion `json:"version"` Nodes []WorkflowVersionNode `json:"nodes"` Links []WorkflowVersionNodeLink `json:"links"` }
type WorkflowStatus ¶ added in v0.18.1
type WorkflowStatus int
type WorkflowTableRow ¶
type WorkflowTableRow struct { WorkflowId int `json:"workflowId" db:"workflow_id"` WorkflowName string `json:"workflowName" db:"workflow_name"` WorkflowStatus int `json:"workflowStatus" db:"workflow_status"` LatestVersionName *string `json:"latestVersionName" db:"latest_version_name"` LatestVersion *int `json:"latestVersion" db:"latest_version"` LatestWorkflowVersionId *int `json:"latestWorkflowVersionId" db:"latest_workflow_version_id"` LatestVersionStatus *int `json:"latestVersionStatus" db:"latest_version_status"` ActiveVersionName *string `json:"activeVersionName" db:"active_version_name"` ActiveVersion *int `json:"activeVersion" db:"active_version"` ActiveWorkflowVersionId *int `json:"activeWorkflowVersionId" db:"active_workflow_version_id"` ActiveVersionStatus *int `json:"activeVersionStatus" db:"active_version_status"` }
func GetWorkflows ¶
func GetWorkflows(db *sqlx.DB) ([]WorkflowTableRow, error)
type WorkflowToTrigger ¶ added in v0.18.1
type WorkflowVersion ¶
type WorkflowVersion struct { WorkflowVersionId int `json:"workflowVersionId" db:"workflow_version_id"` Name string `json:"name" db:"name"` Version int `json:"version" db:"version"` Status WorkflowStatus `json:"status" db:"status"` WorkflowId int `json:"workflowId" db:"workflow_id"` CreatedOn time.Time `json:"createdOn" db:"created_on"` UpdateOn time.Time `json:"updatedOn" db:"updated_on"` }
func GetWorkflowVersion ¶
func GetWorkflowVersionById ¶ added in v0.18.1
func GetWorkflowVersionById(db *sqlx.DB, workflowVersionId int) (WorkflowVersion, error)
func GetWorkflowVersions ¶
func GetWorkflowVersions(db *sqlx.DB, workflowId int) ([]WorkflowVersion, error)
type WorkflowVersionNode ¶
type WorkflowVersionNode struct { WorkflowId int `json:"workflowId" db:"workflow_id"` Version int `json:"version" db:"version"` WorkflowVersionId int `json:"workflowVersionId" db:"workflow_version_id"` WorkflowVersionNodeId int `json:"workflowVersionNodeId" db:"workflow_version_node_id"` Name string `json:"name" db:"name"` Stage int `json:"stage" db:"stage"` Status WorkflowStatus `json:"status" db:"status"` Type commons.WorkflowNodeType `json:"type" db:"type"` Parameters interface{} `json:"parameters" db:"parameters"` VisibilitySettings WorkflowNodeVisibilitySettings `json:"visibilitySettings" db:"visibility_settings"` CreatedOn time.Time `json:"createdOn" db:"created_on"` UpdateOn time.Time `json:"updatedOn" db:"updated_on"` }
func GetWorkflowNodes ¶
func GetWorkflowVersionNode ¶
func GetWorkflowVersionNode(db *sqlx.DB, workflowVersionNodeId int) (WorkflowVersionNode, error)
func (WorkflowVersionNode) GetWorkflowNodeStructured ¶
func (wfn WorkflowVersionNode) GetWorkflowNodeStructured() WorkflowNode
type WorkflowVersionNodeLink ¶
type WorkflowVersionNodeLink struct { WorkflowVersionNodeLinkId int `json:"workflowVersionNodeLinkId" db:"workflow_version_node_link_id"` Name string `json:"name" db:"name"` VisibilitySettings WorkflowVersionNodeLinkVisibilitySettings `json:"visibilitySettings" db:"visibility_settings"` ParentOutput commons.WorkflowParameterLabel `json:"parentOutput" db:"parent_output"` ParentWorkflowVersionNodeId int `json:"parentWorkflowVersionNodeId" db:"parent_workflow_version_node_id"` ChildInput commons.WorkflowParameterLabel `json:"childInput" db:"child_input"` ChildWorkflowVersionNodeId int `json:"childWorkflowVersionNodeId" db:"child_workflow_version_node_id"` WorkflowVersionId int `json:"workflowVersionId" db:"workflow_version_id"` CreatedOn time.Time `json:"createdOn" db:"created_on"` UpdateOn time.Time `json:"updatedOn" db:"updated_on"` Stage int `json:"stage" db:"stage"` }
func GetWorkflowVersionNodeLinks ¶
func GetWorkflowVersionNodeLinks(db *sqlx.DB, workflowVersionId int) ([]WorkflowVersionNodeLink, error)
type WorkflowVersionNodeLinkVisibilitySettings ¶
type WorkflowVersionNodeLinkVisibilitySettings struct { Child LinkVisibilitySettings `json:"child"` Parent LinkVisibilitySettings `json:"parent"` }
func (*WorkflowVersionNodeLinkVisibilitySettings) Scan ¶
func (nvls *WorkflowVersionNodeLinkVisibilitySettings) Scan(val interface{}) (err error)
type WorkflowVersionNodeLog ¶
type WorkflowVersionNodeLog struct { TriggerReference string `json:"triggerReference" db:"trigger_reference"` InputData string `json:"input_data" db:"input_data"` OutputData string `json:"output_data" db:"output_data"` DebugData string `json:"debug_data" db:"debug_data"` ErrorData string `json:"error_data" db:"error_data"` WorkflowVersionNodeId int `json:"workflowVersionNodeId" db:"workflow_version_node_id"` TriggeringWorkflowVersionNodeId *int `json:"triggeringWorkflowVersionNodeId" db:"triggering_workflow_version_node_id"` CreatedOn time.Time `json:"createdOn" db:"created_on"` }
func GetNodeLogs ¶
func GetWorkflowLogs ¶
type WorkflowVersionNodeResponse ¶
type WorkflowVersionNodeResponse struct { WorkflowVersionNode Parameters []byte }
Click to show internal directories.
Click to hide internal directories.