Documentation ¶
Overview ¶
Validate package contains validation functions for the common structures used in the workflow engine, such as Workflows, Tasks, WorkflowInvocations, etc.
All validate functions return either nil (value is valid) or a validate.Error (value is invalid).
Index ¶
- Variables
- func DynamicTaskSpec(task *types.TaskSpec) error
- func Flow(flow controlflow.Flow) error
- func Format(rawErr error) string
- func FormatConcise(rawErr error) string
- func NewError(subject string, errs ...error) error
- func ObjectMetadata(o *types.ObjectMetadata) error
- func Task(task *types.Task) error
- func TaskInvocationSpec(spec *types.TaskInvocationSpec) error
- func TaskSpec(spec *types.TaskSpec) error
- func WorkflowInvocationSpec(spec *types.WorkflowInvocationSpec) error
- func WorkflowSpec(spec *types.WorkflowSpec) error
- type Error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrObjectEmpty = errors.New("no object provided") ErrInvalidAPIVersion = errors.New("unknown API version") ErrWorkflowWithoutTasks = errors.New("workflow needs at least one task") ErrUndefinedDependency = errors.New("task contains undefined dependency") ErrTaskIDMissing = errors.New("task misses an id") ErrTaskNotUnique = errors.New("task is not unique") ErrWorkflowWithoutStartTasks = errors.New("workflow does not contain any start tasks (tasks with 0 dependencies)") ErrTaskRequiresFnRef = errors.New("task requires a function name") ErrCircularDependency = errors.New("workflow contains circular dependency") ErrInvalidOutputTask = errors.New("unknown output task") ErrNoParentTaskDependency = errors.New("dynamic task does not contain parent dependency") ErrMultipleParentTaskDependency = errors.New("dynamic task contains multiple parent tasks") ErrNoWorkflowInvocation = errors.New("workflow invocation id is required") ErrNoTaskInvocation = errors.New("task invocation id is required") ErrNoFnRef = errors.New("function reference is required") ErrNoWorkflow = errors.New("workflow id is required") ErrNoID = errors.New("id is required") ErrNoStatus = errors.New("status is required") ErrPrivacyDisabled = errors.New("privacy field is set to false") )
Functions ¶
func DynamicTaskSpec ¶
func Flow ¶
func Flow(flow controlflow.Flow) error
func FormatConcise ¶
FormatConcise returns a single line description of the errors.
func ObjectMetadata ¶
func ObjectMetadata(o *types.ObjectMetadata) error
func TaskInvocationSpec ¶
func TaskInvocationSpec(spec *types.TaskInvocationSpec) error
func WorkflowInvocationSpec ¶
func WorkflowInvocationSpec(spec *types.WorkflowInvocationSpec) error
func WorkflowSpec ¶
func WorkflowSpec(spec *types.WorkflowSpec) error
WorkflowSpec validates the Workflow Specification.
Types ¶
Click to show internal directories.
Click to hide internal directories.