Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( True = true False = false )
Booleans
Functions ¶
func ProcessNotificationValues ¶
func ProcessNotificationValues(notif NotificationEntry) (sdk.WorkflowNotification, error)
Types ¶
type ConditionEntry ¶
type ConditionEntry struct { PlainConditions []PlainConditionEntry `json:"plain,omitempty" yaml:"check,omitempty"` LuaScript string `json:"script,omitempty" yaml:"script,omitempty"` }
type HookEntry ¶
type HookEntry struct { Model string `` /* 143-byte string literal not displayed */ Config map[string]string `json:"config,omitempty" yaml:"config,omitempty"` Conditions *sdk.WorkflowNodeConditions `` /* 175-byte string literal not displayed */ }
HookEntry represents a hook as code
type NodeEntry ¶
type NodeEntry struct { ID int64 `json:"-" yaml:"-"` DependsOn []string `` /* 141-byte string literal not displayed */ Conditions *ConditionEntry `` /* 175-byte string literal not displayed */ When []string `json:"when,omitempty" yaml:"when,omitempty" jsonschema_description:"Set manual and status condition (ex: 'success')."` //This is used only for manual and success condition PipelineName string `json:"pipeline,omitempty" yaml:"pipeline,omitempty" jsonschema_description:"The name of a pipeline used for pipeline node."` ApplicationName string `` /* 200-byte string literal not displayed */ EnvironmentName string `` /* 200-byte string literal not displayed */ ProjectIntegrationName string `` /* 200-byte string literal not displayed */ OneAtATime *bool `` /* 164-byte string literal not displayed */ Payload map[string]interface{} `json:"payload,omitempty" yaml:"payload,omitempty"` Parameters map[string]string `json:"parameters,omitempty" yaml:"parameters,omitempty" jsonschema_description:"List of parameters for the workflow."` OutgoingHookModelName string `json:"trigger,omitempty" yaml:"trigger,omitempty"` OutgoingHookConfig map[string]string `json:"config,omitempty" yaml:"config,omitempty"` Permissions map[string]int `` /* 182-byte string literal not displayed */ }
NodeEntry represents a node as code
type NotificationEntry ¶
type NotificationEntry struct { Type string `json:"type" yaml:"type"` Settings *sdk.UserNotificationSettings `json:"settings,omitempty" yaml:"settings,omitempty"` }
NotificationEntry represents a notification set on a nodeEntry
type PlainConditionEntry ¶
type PlainConditionEntry struct { Variable string `json:"variable" yaml:"variable"` Operator string `json:"operator" yaml:"operator"` Value string `json:"value" yaml:"value"` }
WorkflowNodeCondition represents a condition to trigger ot not a pipeline in a workflow. Operator can be =, !=, regex
type Workflow ¶
type Workflow struct { Name string `json:"name" yaml:"name" jsonschema_description:"The name of the workflow."` Description string `json:"description,omitempty" yaml:"description,omitempty"` Version string `json:"version,omitempty" yaml:"version,omitempty" jsonschema_description:"Version for the yaml syntax, latest is v1.0."` // this will be filled for complex workflows Workflow map[string]NodeEntry `json:"workflow,omitempty" yaml:"workflow,omitempty" jsonschema_description:"Workflow nodes list."` Hooks map[string][]HookEntry `json:"hooks,omitempty" yaml:"hooks,omitempty" jsonschema_description:"Workflow hooks list."` // this will be filled for simple workflows OneAtATime *bool `` /* 164-byte string literal not displayed */ Conditions *ConditionEntry `` /* 175-byte string literal not displayed */ When []string `json:"when,omitempty" yaml:"when,omitempty" jsonschema_description:"Set manual and status condition (ex: 'success')."` //This is used only for manual and success condition PipelineName string `json:"pipeline,omitempty" yaml:"pipeline,omitempty" jsonschema_description:"The name of a pipeline used for pipeline node."` Payload map[string]interface{} `json:"payload,omitempty" yaml:"payload,omitempty"` Parameters map[string]string `json:"parameters,omitempty" yaml:"parameters,omitempty" jsonschema_description:"List of parameters for the workflow."` ApplicationName string `` /* 200-byte string literal not displayed */ EnvironmentName string `` /* 200-byte string literal not displayed */ ProjectIntegrationName string `` /* 200-byte string literal not displayed */ PipelineHooks []HookEntry `json:"pipeline_hooks,omitempty" yaml:"pipeline_hooks,omitempty"` // extra workflow data Permissions map[string]int `` /* 186-byte string literal not displayed */ Metadata map[string]string `json:"metadata,omitempty" yaml:"metadata,omitempty"` PurgeTags []string `json:"purge_tags,omitempty" yaml:"purge_tags,omitempty"` Notifications []NotificationEntry `json:"notify,omitempty" yaml:"notify,omitempty"` // This is used when the workflow have only one pipeline HistoryLength *int64 `json:"history_length,omitempty" yaml:"history_length,omitempty"` MapNotifications map[string][]NotificationEntry `json:"notifications,omitempty" yaml:"notifications,omitempty"` // This is used when the workflow have more than one pipeline }
Workflow is the "as code" representation of a sdk.Workflow
func (Workflow) CheckDependencies ¶
func (Workflow) CheckValidity ¶
func (Workflow) GetVersion ¶
Click to show internal directories.
Click to hide internal directories.