model

package
v2.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 13 Imported by: 20

Documentation

Index

Constants

View Source
const (
	// UnlimitedTimeout description for unlimited timeouts
	UnlimitedTimeout = "unlimited"
)
View Source
const ValidatorContextValue contextValueKey = "value"

Variables

This section is empty.

Functions

func NewValidatorContext added in v2.2.4

func NewValidatorContext(workflow *Workflow) context.Context

func ToInterface added in v2.2.5

func ToInterface(object Object) any

func ValidationWrap added in v2.2.4

func ValidationWrap(fnCtx WorkflowValidator) validator.StructLevelFuncCtx

Types

type Action

type Action struct {
	// Defines Unique action identifier.
	// +optional
	ID string `json:"id,omitempty"`
	// Defines Unique action name.
	// +optional
	Name string `json:"name,omitempty"`
	// References a reusable function definition.
	// +optional
	FunctionRef *FunctionRef `json:"functionRef,omitempty"`
	// References a 'trigger' and 'result' reusable event definitions.
	// +optional
	EventRef *EventRef `json:"eventRef,omitempty"`
	// References a workflow to be invoked.
	// +optional
	SubFlowRef *WorkflowRef `json:"subFlowRef,omitempty"`
	// Defines time period workflow execution should sleep before / after function execution.
	// +optional
	Sleep *Sleep `json:"sleep,omitempty"`
	// References a defined workflow retry definition. If not defined uses the default runtime retry definition.
	// +optional
	RetryRef string `json:"retryRef,omitempty"`
	// List of unique references to defined workflow errors for which the action should not be retried.
	// Used only when `autoRetries` is set to `true`
	// +optional
	NonRetryableErrors []string `json:"nonRetryableErrors,omitempty" validate:"omitempty,min=1"`
	// List of unique references to defined workflow errors for which the action should be retried.
	// Used only when `autoRetries` is set to `false`
	// +optional
	RetryableErrors []string `json:"retryableErrors,omitempty" validate:"omitempty,min=1"`
	// Filter the state data to select only the data that can be used within function definition arguments
	// using its fromStateData property. Filter the action results to select only the result data that should
	// be added/merged back into the state data using its results property. Select the part of state data which
	// the action data results should be added/merged to using the toStateData property.
	// +optional
	ActionDataFilter ActionDataFilter `json:"actionDataFilter,omitempty"`
	// Expression, if defined, must evaluate to true for this action to be performed. If false, action is disregarded.
	// +optional
	Condition string `json:"condition,omitempty"`
}

Action specify invocations of services or other workflows during workflow execution.

func (*Action) ApplyDefault added in v2.2.3

func (a *Action) ApplyDefault()

ApplyDefault set the default values for Action

func (*Action) DeepCopy added in v2.2.0

func (in *Action) DeepCopy() *Action

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Action.

func (*Action) DeepCopyInto added in v2.2.0

func (in *Action) DeepCopyInto(out *Action)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Action) UnmarshalJSON added in v2.2.0

func (a *Action) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type ActionDataFilter

type ActionDataFilter struct {
	// Workflow expression that filters state data that can be used by the action.
	// +optional
	// +optional
	FromStateData string `json:"fromStateData,omitempty"`
	// If set to false, action data results are not added/merged to state data. In this case 'results'
	// and 'toStateData' should be ignored. Default is true.
	// +optional
	UseResults bool `json:"useResults,omitempty"`
	// Workflow expression that filters the actions data results.
	// +optional
	Results string `json:"results,omitempty"`
	// Workflow expression that selects a state data element to which the action results should be
	// added/merged into. If not specified denotes the top-level state data element.
	// +optional
	ToStateData string `json:"toStateData,omitempty"`
}

ActionDataFilter used to filter action data results. +optional +optional

func (*ActionDataFilter) ApplyDefault added in v2.2.3

func (a *ActionDataFilter) ApplyDefault()

ApplyDefault set the default values for Action Data Filter

func (*ActionDataFilter) DeepCopy added in v2.2.0

func (in *ActionDataFilter) DeepCopy() *ActionDataFilter

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionDataFilter.

func (*ActionDataFilter) DeepCopyInto added in v2.2.0

func (in *ActionDataFilter) DeepCopyInto(out *ActionDataFilter)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ActionDataFilter) UnmarshalJSON added in v2.2.0

func (a *ActionDataFilter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type ActionMode

type ActionMode string

ActionMode specifies how actions are to be performed.

const (
	// ActionModeSequential specifies actions should be performed in sequence
	ActionModeSequential ActionMode = "sequential"

	// ActionModeParallel specifies actions should be performed in parallel
	ActionModeParallel ActionMode = "parallel"
)

func (ActionMode) KindValues added in v2.2.4

func (i ActionMode) KindValues() []string

func (ActionMode) String added in v2.2.4

func (i ActionMode) String() string

type Auth added in v2.1.0

type Auth struct {
	// Unique auth definition name.
	// +kubebuilder:validation:Required
	Name string `json:"name" validate:"required"`
	// Auth scheme, can be "basic", "bearer", or "oauth2". Default is "basic"
	// +kubebuilder:validation:Enum=basic;bearer;oauth2
	// +kubebuilder:default=basic
	// +kubebuilder:validation:Required
	Scheme AuthType `json:"scheme" validate:"required,oneofkind"`
	// Auth scheme properties. Can be one of "Basic properties definition", "Bearer properties definition",
	// or "OAuth2 properties definition"
	// +kubebuilder:validation:Required
	Properties AuthProperties `json:"properties" validate:"required"`
}

Auth definitions can be used to define authentication information that should be applied to resources defined in the operation property of function definitions. It is not used as authentication information for the function invocation, but just to access the resource containing the function invocation information.

func (*Auth) DeepCopy added in v2.2.0

func (in *Auth) DeepCopy() *Auth

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Auth.

func (*Auth) DeepCopyInto added in v2.2.0

func (in *Auth) DeepCopyInto(out *Auth)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Auth) MarshalJSON added in v2.2.3

func (a *Auth) MarshalJSON() ([]byte, error)

func (*Auth) UnmarshalJSON added in v2.1.0

func (a *Auth) UnmarshalJSON(data []byte) error

UnmarshalJSON Auth definition

type AuthProperties added in v2.1.0

type AuthProperties struct {
	Basic  *BasicAuthProperties  `json:",omitempty"`
	Bearer *BearerAuthProperties `json:",omitempty"`
	OAuth2 *OAuth2AuthProperties `json:",omitempty"`
}

AuthProperties ...

func (*AuthProperties) DeepCopy added in v2.2.3

func (in *AuthProperties) DeepCopy() *AuthProperties

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthProperties.

func (*AuthProperties) DeepCopyInto added in v2.2.3

func (in *AuthProperties) DeepCopyInto(out *AuthProperties)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AuthType added in v2.1.0

type AuthType string

AuthType can be "basic", "bearer", or "oauth2". Default is "basic"

const (
	// AuthTypeBasic ...
	AuthTypeBasic AuthType = "basic"
	// AuthTypeBearer ...
	AuthTypeBearer AuthType = "bearer"
	// AuthTypeOAuth2 ...
	AuthTypeOAuth2 AuthType = "oauth2"
)

func (AuthType) KindValues added in v2.2.4

func (i AuthType) KindValues() []string

func (AuthType) String added in v2.2.4

func (i AuthType) String() string

type Auths added in v2.2.3

type Auths []Auth

func (Auths) DeepCopy added in v2.2.3

func (in Auths) DeepCopy() Auths

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Auths.

func (Auths) DeepCopyInto added in v2.2.3

func (in Auths) DeepCopyInto(out *Auths)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Auths) UnmarshalJSON added in v2.2.3

func (r *Auths) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type BaseState

type BaseState struct {
	// Unique State id.
	// +optional
	ID string `json:"id,omitempty"`
	// State name.
	// +kubebuilder:validation:Required
	Name string `json:"name" validate:"required"`
	// stateType can be any of delay, callback, event, foreach, inject, operation, parallel, sleep, switch
	// +kubebuilder:validation:Enum:=delay;callback;event;foreach;inject;operation;parallel;sleep;switch
	// +kubebuilder:validation:Required
	Type StateType `json:"type" validate:"required,oneofkind"`
	// States error handling and retries definitions.
	// +optional
	OnErrors []OnError `json:"onErrors,omitempty"  validate:"omitempty,dive"`
	// Next transition of the workflow after the time delay.
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	// +optional
	Transition *Transition `json:"transition,omitempty"`
	// State data filter.
	// +optional
	StateDataFilter *StateDataFilter `json:"stateDataFilter,omitempty"`
	// Unique Name of a workflow state which is responsible for compensation of this state.
	// +optional
	CompensatedBy string `json:"compensatedBy,omitempty"`
	// If true, this state is used to compensate another state. Default is false.
	// +optional
	UsedForCompensation bool `json:"usedForCompensation,omitempty"`
	// State end definition.
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	// +optional
	End *End `json:"end,omitempty"`
	// Metadata information.
	// +optional
	Metadata *Metadata `json:"metadata,omitempty"`
}

BaseState ...

func (*BaseState) DeepCopy added in v2.2.0

func (in *BaseState) DeepCopy() *BaseState

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BaseState.

func (*BaseState) DeepCopyInto added in v2.2.0

func (in *BaseState) DeepCopyInto(out *BaseState)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BaseState) MarshalJSON added in v2.2.3

func (b *BaseState) MarshalJSON() ([]byte, error)

type BaseWorkflow

type BaseWorkflow struct {
	// Workflow unique identifier
	// +optional
	ID string `json:"id,omitempty" validate:"required_without=Key"`
	// Key Domain-specific workflow identifier
	// +optional
	Key string `json:"key,omitempty" validate:"required_without=ID"`
	// Workflow name
	Name string `json:"name,omitempty"`
	// Workflow description.
	// +optional
	Description string `json:"description,omitempty"`
	// Workflow version.
	// +optional
	Version string `json:"version" validate:"omitempty,min=1"`
	// Workflow start definition.
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	// +optional
	Start *Start `json:"start,omitempty"`
	// Annotations List of helpful terms describing the workflows intended purpose, subject areas, or other important
	// qualities.
	// +optional
	Annotations []string `json:"annotations,omitempty"`
	// DataInputSchema URI of the JSON Schema used to validate the workflow data input
	// +optional
	DataInputSchema *DataInputSchema `json:"dataInputSchema,omitempty"`
	// Serverless Workflow schema version
	// +kubebuilder:validation:Required
	// +kubebuilder:default="0.8"
	SpecVersion string `json:"specVersion" validate:"required"`
	// Secrets allow you to access sensitive information, such as passwords, OAuth tokens, ssh keys, etc,
	// inside your Workflow Expressions.
	// +optional
	Secrets Secrets `json:"secrets,omitempty" validate:"unique"`
	// Constants Workflow constants are used to define static, and immutable, data which is available to
	// Workflow Expressions.
	// +optional
	Constants *Constants `json:"constants,omitempty"`
	// Identifies the expression language used for workflow expressions. Default is 'jq'.
	// +kubebuilder:validation:Enum=jq;jsonpath;cel
	// +kubebuilder:default=jq
	// +optional
	ExpressionLang ExpressionLangType `json:"expressionLang,omitempty" validate:"required,oneofkind"`
	// Defines the workflow default timeout settings.
	// +optional
	Timeouts *Timeouts `json:"timeouts,omitempty"`
	// Defines checked errors that can be explicitly handled during workflow execution.
	// +optional
	Errors Errors `json:"errors,omitempty" validate:"unique=Name,dive"`
	// If "true", workflow instances is not terminated when there are no active execution paths.
	// Instance can be terminated with "terminate end definition" or reaching defined "workflowExecTimeout"
	// +optional
	KeepActive bool `json:"keepActive,omitempty"`
	// Metadata custom information shared with the runtime.
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	// +optional
	Metadata Metadata `json:"metadata,omitempty"`
	// AutoRetries If set to true, actions should automatically be retried on unchecked errors. Default is false
	// +optional
	AutoRetries bool `json:"autoRetries,omitempty"`
	// Auth definitions can be used to define authentication information that should be applied to resources defined
	// in the operation property of function definitions. It is not used as authentication information for the
	// function invocation, but just to access the resource containing the function invocation information.
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	// +optional
	Auth Auths `json:"auth,omitempty" validate:"unique=Name,dive"`
}

BaseWorkflow describes the partial Workflow definition that does not rely on generic interfaces to make it easy for custom unmarshalers implementations to unmarshal the common data structure.

func (*BaseWorkflow) DeepCopy added in v2.2.0

func (in *BaseWorkflow) DeepCopy() *BaseWorkflow

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BaseWorkflow.

func (*BaseWorkflow) DeepCopyInto added in v2.2.0

func (in *BaseWorkflow) DeepCopyInto(out *BaseWorkflow)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BasicAuthProperties added in v2.1.0

type BasicAuthProperties struct {
	Common `json:",inline"`
	// Secret Expression referencing a workflow secret that contains all needed auth info
	// +optional
	Secret string `json:"secret,omitempty"`
	// Username String or a workflow expression. Contains the username
	// +kubebuilder:validation:Required
	Username string `json:"username" validate:"required"`
	// Password String or a workflow expression. Contains the user password
	// +kubebuilder:validation:Required
	Password string `json:"password" validate:"required"`
}

BasicAuthProperties Basic Auth Info

func (*BasicAuthProperties) DeepCopy added in v2.2.0

func (in *BasicAuthProperties) DeepCopy() *BasicAuthProperties

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicAuthProperties.

func (*BasicAuthProperties) DeepCopyInto added in v2.2.0

func (in *BasicAuthProperties) DeepCopyInto(out *BasicAuthProperties)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BearerAuthProperties added in v2.1.0

type BearerAuthProperties struct {
	Common `json:",inline"`
	// Secret Expression referencing a workflow secret that contains all needed auth info
	// +optional
	Secret string `json:"secret,omitempty"`
	// Token String or a workflow expression. Contains the token
	// +kubebuilder:validation:Required
	Token string `json:"token" validate:"required"`
}

BearerAuthProperties Bearer auth information

func (*BearerAuthProperties) DeepCopy added in v2.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BearerAuthProperties.

func (*BearerAuthProperties) DeepCopyInto added in v2.2.0

func (in *BearerAuthProperties) DeepCopyInto(out *BearerAuthProperties)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Branch

type Branch struct {
	// Branch name
	// +kubebuilder:validation:Required
	Name string `json:"name" validate:"required"`
	// Actions to be executed in this branch
	// +kubebuilder:validation:MinItems=1
	Actions []Action `json:"actions" validate:"required,min=1,dive"`
	// Branch specific timeout settings
	// +optional
	Timeouts *BranchTimeouts `json:"timeouts,omitempty"`
}

Branch Definition

func (*Branch) DeepCopy added in v2.2.0

func (in *Branch) DeepCopy() *Branch

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Branch.

func (*Branch) DeepCopyInto added in v2.2.0

func (in *Branch) DeepCopyInto(out *Branch)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BranchTimeouts added in v2.1.0

type BranchTimeouts struct {
	// Single actions definition execution timeout duration (ISO 8601 duration format)
	// +optional
	ActionExecTimeout string `json:"actionExecTimeout,omitempty" validate:"omitempty,iso8601duration"`
	// Single branch execution timeout duration (ISO 8601 duration format)
	// +optional
	BranchExecTimeout string `json:"branchExecTimeout,omitempty" validate:"omitempty,iso8601duration"`
}

BranchTimeouts defines the specific timeout settings for branch

func (*BranchTimeouts) DeepCopy added in v2.2.0

func (in *BranchTimeouts) DeepCopy() *BranchTimeouts

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BranchTimeouts.

func (*BranchTimeouts) DeepCopyInto added in v2.2.0

func (in *BranchTimeouts) DeepCopyInto(out *BranchTimeouts)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CallbackState

type CallbackState struct {
	// Defines the action to be executed.
	// +kubebuilder:validation:Required
	Action Action `json:"action"`
	// References a unique callback event name in the defined workflow events.
	// +kubebuilder:validation:Required
	EventRef string `json:"eventRef" validate:"required"`
	// Time period to wait for incoming events (ISO 8601 format)
	// +optional
	Timeouts *CallbackStateTimeout `json:"timeouts,omitempty"`
	// Event data filter definition.
	// +optional
	EventDataFilter *EventDataFilter `json:"eventDataFilter,omitempty"`
}

CallbackState executes a function and waits for callback event that indicates completion of the task.

func (*CallbackState) DeepCopy added in v2.2.0

func (in *CallbackState) DeepCopy() *CallbackState

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CallbackState.

func (*CallbackState) DeepCopyInto added in v2.2.0

func (in *CallbackState) DeepCopyInto(out *CallbackState)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CallbackState) MarshalJSON added in v2.2.3

func (c *CallbackState) MarshalJSON() ([]byte, error)

type CallbackStateTimeout added in v2.1.0

type CallbackStateTimeout struct {
	// Default workflow state execution timeout (ISO 8601 duration format)
	// +optional
	StateExecTimeout *StateExecTimeout `json:"stateExecTimeout,omitempty"`
	// Default single actions definition execution timeout (ISO 8601 duration format)
	// +optional
	ActionExecTimeout string `json:"actionExecTimeout,omitempty" validate:"omitempty,iso8601duration"`
	// Default timeout for consuming defined events (ISO 8601 duration format)
	// +optional
	EventTimeout string `json:"eventTimeout,omitempty" validate:"omitempty,iso8601duration"`
}

CallbackStateTimeout defines timeout settings for callback state

func (*CallbackStateTimeout) DeepCopy added in v2.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CallbackStateTimeout.

func (*CallbackStateTimeout) DeepCopyInto added in v2.2.0

func (in *CallbackStateTimeout) DeepCopyInto(out *CallbackStateTimeout)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Common

type Common struct {
	// Metadata information
	// +optional
	Metadata Metadata `json:"metadata,omitempty"`
}

Common schema for Serverless Workflow specification

func (*Common) DeepCopy added in v2.2.0

func (in *Common) DeepCopy() *Common

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Common.

func (*Common) DeepCopyInto added in v2.2.0

func (in *Common) DeepCopyInto(out *Common)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CompletionType

type CompletionType string

CompletionType define on how to complete branch execution.

const (
	// CompletionTypeAllOf defines all branches must complete execution before the state can transition/end.
	CompletionTypeAllOf CompletionType = "allOf"
	// CompletionTypeAtLeast defines state can transition/end once at least the specified number of branches
	// have completed execution.
	CompletionTypeAtLeast CompletionType = "atLeast"
)

func (CompletionType) KindValues added in v2.2.4

func (i CompletionType) KindValues() []string

func (CompletionType) String added in v2.2.4

func (i CompletionType) String() string

type Constants added in v2.1.0

type Constants struct {
	// Data represents the generic structure of the constants value
	// +optional
	Data ConstantsData `json:",omitempty"`
}

Constants Workflow constants are used to define static, and immutable, data which is available to Workflow Expressions.

func (*Constants) DeepCopy added in v2.2.0

func (in *Constants) DeepCopy() *Constants

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Constants.

func (*Constants) DeepCopyInto added in v2.2.0

func (in *Constants) DeepCopyInto(out *Constants)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Constants) UnmarshalJSON added in v2.1.0

func (c *Constants) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type ConstantsData added in v2.2.3

type ConstantsData map[string]json.RawMessage

func (ConstantsData) DeepCopy added in v2.2.3

func (in ConstantsData) DeepCopy() ConstantsData

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConstantsData.

func (ConstantsData) DeepCopyInto added in v2.2.3

func (in ConstantsData) DeepCopyInto(out *ConstantsData)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ContinueAs added in v2.1.0

type ContinueAs struct {
	// Unique id of the workflow to continue execution as.
	// +kubebuilder:validation:Required
	WorkflowID string `json:"workflowId" validate:"required"`
	// Version of the workflow to continue execution as.
	// +optional
	Version string `json:"version,omitempty"`
	// If string type, an expression which selects parts of the states data output to become the workflow data input of
	// continued execution. If object type, a custom object to become the workflow data input of the continued execution
	// +optional
	Data Object `json:"data,omitempty"`
	// WorkflowExecTimeout Workflow execution timeout to be used by the workflow continuing execution.
	// Overwrites any specific settings set by that workflow
	// +optional
	WorkflowExecTimeout WorkflowExecTimeout `json:"workflowExecTimeout,omitempty"`
}

ContinueAs can be used to stop the current workflow execution and start another one (of the same or a different type)

func (*ContinueAs) DeepCopy added in v2.2.0

func (in *ContinueAs) DeepCopy() *ContinueAs

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContinueAs.

func (*ContinueAs) DeepCopyInto added in v2.2.0

func (in *ContinueAs) DeepCopyInto(out *ContinueAs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ContinueAs) UnmarshalJSON added in v2.2.0

func (c *ContinueAs) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type Correlation

type Correlation struct {
	// CloudEvent Extension Context Attribute name
	// +kubebuilder:validation:Required
	ContextAttributeName string `json:"contextAttributeName" validate:"required"`
	// CloudEvent Extension Context Attribute value
	// +optional
	ContextAttributeValue string `json:"contextAttributeValue,omitempty"`
}

Correlation define event correlation rules for an event. Only used for `consumed` events

func (*Correlation) DeepCopy added in v2.2.0

func (in *Correlation) DeepCopy() *Correlation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Correlation.

func (*Correlation) DeepCopyInto added in v2.2.0

func (in *Correlation) DeepCopyInto(out *Correlation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Cron

type Cron struct {
	// Cron expression describing when the workflow instance should be created (automatically).
	// +kubebuilder:validation:Required
	Expression string `json:"expression" validate:"required"`
	// Specific date and time (ISO 8601 format) when the cron expression is no longer valid.
	// +optional
	ValidUntil string `json:"validUntil,omitempty" validate:"omitempty,iso8601datetime"`
}

Cron ...

func (*Cron) DeepCopy added in v2.2.0

func (in *Cron) DeepCopy() *Cron

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cron.

func (*Cron) DeepCopyInto added in v2.2.0

func (in *Cron) DeepCopyInto(out *Cron)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Cron) UnmarshalJSON

func (c *Cron) UnmarshalJSON(data []byte) error

UnmarshalJSON custom unmarshal function for Cron

type DataCondition

type DataCondition struct {
	// Data condition name.
	// +optional
	Name string `json:"name,omitempty"`
	// Workflow expression evaluated against state data. Must evaluate to true or false.
	// +kubebuilder:validation:Required
	Condition string `json:"condition" validate:"required"`
	// Metadata information.
	// +optional
	Metadata Metadata `json:"metadata,omitempty"`
	// TODO End or Transition needs to be exclusive tag, one or another should be set.
	// Explicit transition to end
	End *End `json:"end" validate:"omitempty"`
	// Workflow transition if condition is evaluated to true
	Transition *Transition `json:"transition,omitempty" validate:"omitempty"`
}

DataCondition specify a data-based condition statement which causes a transition to another workflow state if evaluated to true.

func (*DataCondition) DeepCopy added in v2.2.0

func (in *DataCondition) DeepCopy() *DataCondition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataCondition.

func (*DataCondition) DeepCopyInto added in v2.2.0

func (in *DataCondition) DeepCopyInto(out *DataCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DataInputSchema added in v2.1.0

type DataInputSchema struct {
	// +kubebuilder:validation:Required
	Schema string `json:"schema" validate:"required"`
	// +kubebuilder:validation:Required
	FailOnValidationErrors bool `json:"failOnValidationErrors"`
}

DataInputSchema Used to validate the workflow data input against a defined JSON Schema

func (*DataInputSchema) ApplyDefault added in v2.2.3

func (d *DataInputSchema) ApplyDefault()

ApplyDefault set the default values for Data Input Schema

func (*DataInputSchema) DeepCopy added in v2.2.0

func (in *DataInputSchema) DeepCopy() *DataInputSchema

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataInputSchema.

func (*DataInputSchema) DeepCopyInto added in v2.2.0

func (in *DataInputSchema) DeepCopyInto(out *DataInputSchema)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DataInputSchema) UnmarshalJSON added in v2.1.0

func (d *DataInputSchema) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type DefaultCondition added in v2.1.0

type DefaultCondition struct {
	// Serverless workflow states can have one or more incoming and outgoing transitions (from/to other states).
	// Each state can define a transition definition that is used to determine which state to transition to next.
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	// +optional
	Transition *Transition `json:"transition,omitempty"`
	// 	If this state an end state
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	// +optional
	End *End `json:"end,omitempty"`
}

DefaultCondition Can be either a transition or end definition

func (*DefaultCondition) DeepCopy added in v2.2.0

func (in *DefaultCondition) DeepCopy() *DefaultCondition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefaultCondition.

func (*DefaultCondition) DeepCopyInto added in v2.2.0

func (in *DefaultCondition) DeepCopyInto(out *DefaultCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DefaultCondition) UnmarshalJSON added in v2.2.3

func (e *DefaultCondition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type DelayState

type DelayState struct {
	// Amount of time (ISO 8601 format) to delay
	// +kubebuilder:validation:Required
	TimeDelay string `json:"timeDelay" validate:"required,iso8601duration"`
}

DelayState Causes the workflow execution to delay for a specified duration

func (*DelayState) DeepCopy added in v2.2.0

func (in *DelayState) DeepCopy() *DelayState

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DelayState.

func (*DelayState) DeepCopyInto added in v2.2.0

func (in *DelayState) DeepCopyInto(out *DelayState)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DelayState) MarshalJSON added in v2.2.3

func (a *DelayState) MarshalJSON() ([]byte, error)

type End

type End struct {
	// If true, completes all execution flows in the given workflow instance.
	// +optional
	Terminate bool `json:"terminate,omitempty"`
	// Array of producedEvent definitions. Defines events that should be produced.
	// +optional
	ProduceEvents []ProduceEvent `json:"produceEvents,omitempty"`
	// If set to true, triggers workflow compensation before workflow execution completes. Default is false.
	// +optional
	Compensate bool `json:"compensate,omitempty"`
	// Defines that current workflow execution should stop, and execution should continue as a new workflow
	// instance of the provided id
	// +optional
	ContinueAs *ContinueAs `json:"continueAs,omitempty"`
}

End definition

func (*End) DeepCopy added in v2.2.0

func (in *End) DeepCopy() *End

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new End.

func (*End) DeepCopyInto added in v2.2.0

func (in *End) DeepCopyInto(out *End)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*End) UnmarshalJSON

func (e *End) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type Error

type Error struct {
	// Name Domain-specific error name.
	// +kubebuilder:validation:Required
	Name string `json:"name" validate:"required"`
	// Code OnError code. Can be used in addition to the name to help runtimes resolve to technical errors/exceptions.
	// Should not be defined if error is set to '*'.
	// +optional
	Code string `json:"code,omitempty" validate:"omitempty,min=1"`
	// OnError description.
	// +optional
	Description string `json:"description,omitempty"`
}

Error declaration for workflow definitions

func (*Error) DeepCopy added in v2.2.0

func (in *Error) DeepCopy() *Error

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Error.

func (*Error) DeepCopyInto added in v2.2.0

func (in *Error) DeepCopyInto(out *Error)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Errors added in v2.2.3

type Errors []Error

func (Errors) DeepCopy added in v2.2.3

func (in Errors) DeepCopy() Errors

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Errors.

func (Errors) DeepCopyInto added in v2.2.3

func (in Errors) DeepCopyInto(out *Errors)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Errors) UnmarshalJSON added in v2.2.3

func (e *Errors) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type Event

type Event struct {
	Common `json:",inline"`
	// Unique event name.
	// +kubebuilder:validation:Required
	Name string `json:"name" validate:"required"`
	// CloudEvent source.
	// +optional
	Source string `json:"source,omitempty"`
	// CloudEvent type.
	// +kubebuilder:validation:Required
	Type string `json:"type" validate:"required"`
	// Defines the CloudEvent as either 'consumed' or 'produced' by the workflow. Defaults to `consumed`.
	// +kubebuilder:validation:Enum=consumed;produced
	// +kubebuilder:default=consumed
	Kind EventKind `json:"kind,omitempty" validate:"required,oneofkind"`
	// If `true`, only the Event payload is accessible to consuming Workflow states. If `false`, both event payload
	// and context attributes should be accessible. Defaults to true.
	// +optional
	DataOnly bool `json:"dataOnly,omitempty"`
	// Define event correlation rules for this event. Only used for consumed events.
	// +optional
	Correlation []Correlation `json:"correlation,omitempty" validate:"dive"`
}

Event used to define events and their correlations

func (*Event) ApplyDefault added in v2.2.3

func (e *Event) ApplyDefault()

ApplyDefault set the default values for Event

func (*Event) DeepCopy added in v2.2.0

func (in *Event) DeepCopy() *Event

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Event.

func (*Event) DeepCopyInto added in v2.2.0

func (in *Event) DeepCopyInto(out *Event)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Event) UnmarshalJSON added in v2.2.0

func (e *Event) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshal Event object from json bytes

type EventCondition

type EventCondition struct {
	// Event condition name.
	// +optional
	Name string `json:"name,omitempty"`
	// References a unique event name in the defined workflow events.
	// +kubebuilder:validation:Required
	EventRef string `json:"eventRef" validate:"required"`
	// Event data filter definition.
	// +optional
	EventDataFilter *EventDataFilter `json:"eventDataFilter,omitempty"`
	// Metadata information.
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	// +optional
	Metadata Metadata `json:"metadata,omitempty"`
	// TODO End or Transition needs to be exclusive tag, one or another should be set.
	// Explicit transition to end
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	// +optional
	End *End `json:"end" validate:"omitempty"`
	// Workflow transition if condition is evaluated to true
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	// +optional
	Transition *Transition `json:"transition" validate:"omitempty"`
}

EventCondition specify events which the switch state must wait for.

func (*EventCondition) DeepCopy added in v2.2.0

func (in *EventCondition) DeepCopy() *EventCondition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventCondition.

func (*EventCondition) DeepCopyInto added in v2.2.0

func (in *EventCondition) DeepCopyInto(out *EventCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EventConditions added in v2.2.4

type EventConditions []EventCondition

func (EventConditions) DeepCopy added in v2.2.4

func (in EventConditions) DeepCopy() EventConditions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventConditions.

func (EventConditions) DeepCopyInto added in v2.2.4

func (in EventConditions) DeepCopyInto(out *EventConditions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EventDataFilter

type EventDataFilter struct {
	// If set to false, event payload is not added/merged to state data. In this case 'data' and 'toStateData'
	// should be ignored. Default is true.
	// +optional
	UseData bool `json:"useData,omitempty"`
	// Workflow expression that filters of the event data (payload).
	// +optional
	Data string `json:"data,omitempty"`
	// Workflow expression that selects a state data element to which the action results should be added/merged into.
	// If not specified denotes the top-level state data element
	// +optional
	ToStateData string `json:"toStateData,omitempty"`
}

EventDataFilter used to filter consumed event payloads.

func (*EventDataFilter) ApplyDefault added in v2.2.3

func (f *EventDataFilter) ApplyDefault()

ApplyDefault set the default values for Event Data Filter

func (*EventDataFilter) DeepCopy added in v2.2.0

func (in *EventDataFilter) DeepCopy() *EventDataFilter

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventDataFilter.

func (*EventDataFilter) DeepCopyInto added in v2.2.0

func (in *EventDataFilter) DeepCopyInto(out *EventDataFilter)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*EventDataFilter) UnmarshalJSON added in v2.2.0

func (f *EventDataFilter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type EventKind

type EventKind string

EventKind defines this event as either `consumed` or `produced`

const (
	// EventKindConsumed means the event continuation of workflow instance execution
	EventKindConsumed EventKind = "consumed"

	// EventKindProduced means the event was created during workflow instance execution
	EventKindProduced EventKind = "produced"
)

func (EventKind) KindValues added in v2.2.4

func (i EventKind) KindValues() []string

func (EventKind) String added in v2.2.4

func (i EventKind) String() string

type EventRef

type EventRef struct {
	// Reference to the unique name of a 'produced' event definition,
	// +kubebuilder:validation:Required
	TriggerEventRef string `json:"triggerEventRef" validate:"required"`
	// Reference to the unique name of a 'consumed' event definition
	// +kubebuilder:validation:Required
	ResultEventRef string `json:"resultEventRef" validate:"required"`
	// Maximum amount of time (ISO 8601 format) to wait for the result event. If not defined it be set to the
	// actionExecutionTimeout
	// +optional
	ResultEventTimeout string `json:"resultEventTimeout,omitempty" validate:"omitempty,iso8601duration"`
	// If string type, an expression which selects parts of the states data output to become the data (payload)
	// of the event referenced by triggerEventRef. If object type, a custom object to become the data (payload)
	// of the event referenced by triggerEventRef.
	// +optional
	Data *Object `json:"data,omitempty"`
	// Add additional extension context attributes to the produced event.
	// +optional
	ContextAttributes map[string]Object `json:"contextAttributes,omitempty"`
	// Specifies if the function should be invoked sync or async. Default is sync.
	// +kubebuilder:validation:Enum=async;sync
	// +kubebuilder:default=sync
	Invoke InvokeKind `json:"invoke,omitempty" validate:"required,oneofkind"`
}

EventRef defining invocation of a function via event

func (*EventRef) ApplyDefault added in v2.2.3

func (e *EventRef) ApplyDefault()

ApplyDefault set the default values for Event Ref

func (*EventRef) DeepCopy added in v2.2.0

func (in *EventRef) DeepCopy() *EventRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventRef.

func (*EventRef) DeepCopyInto added in v2.2.0

func (in *EventRef) DeepCopyInto(out *EventRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*EventRef) UnmarshalJSON added in v2.2.0

func (e *EventRef) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type EventState

type EventState struct {

	// If true consuming one of the defined events causes its associated actions to be performed. If false all
	// the defined events must be consumed in order for actions to be performed. Defaults to true.
	// +kubebuilder:default=true
	// +optional
	Exclusive bool `json:"exclusive,omitempty"`
	// Define the events to be consumed and optional actions to be performed.
	// +kubebuilder:validation:MinItems=1
	OnEvents []OnEvents `json:"onEvents" validate:"required,min=1,dive"`
	// State specific timeouts.
	// +optional
	Timeouts *EventStateTimeout `json:"timeouts,omitempty"`
}

EventState await one or more events and perform actions when they are received. If defined as the workflow starting state, the event state definition controls when the workflow instances should be created.

func (*EventState) ApplyDefault added in v2.2.3

func (e *EventState) ApplyDefault()

ApplyDefault set the default values for Event State

func (*EventState) DeepCopy added in v2.2.0

func (in *EventState) DeepCopy() *EventState

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventState.

func (*EventState) DeepCopyInto added in v2.2.0

func (in *EventState) DeepCopyInto(out *EventState)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*EventState) MarshalJSON added in v2.2.3

func (e *EventState) MarshalJSON() ([]byte, error)

func (*EventState) UnmarshalJSON

func (e *EventState) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshal EventState object from json bytes

type EventStateTimeout added in v2.1.0

type EventStateTimeout struct {
	// Default workflow state execution timeout (ISO 8601 duration format)
	// +optional
	StateExecTimeout *StateExecTimeout `json:"stateExecTimeout,omitempty"`
	// Default single actions definition execution timeout (ISO 8601 duration format)
	// +optional
	ActionExecTimeout string `json:"actionExecTimeout,omitempty" validate:"omitempty,iso8601duration"`
	// Default timeout for consuming defined events (ISO 8601 duration format)
	// +optional
	EventTimeout string `json:"eventTimeout,omitempty" validate:"omitempty,iso8601duration"`
}

EventStateTimeout defines timeout settings for event state

func (*EventStateTimeout) DeepCopy added in v2.2.0

func (in *EventStateTimeout) DeepCopy() *EventStateTimeout

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventStateTimeout.

func (*EventStateTimeout) DeepCopyInto added in v2.2.0

func (in *EventStateTimeout) DeepCopyInto(out *EventStateTimeout)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Events added in v2.2.3

type Events []Event

func (Events) DeepCopy added in v2.2.3

func (in Events) DeepCopy() Events

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Events.

func (Events) DeepCopyInto added in v2.2.3

func (in Events) DeepCopyInto(out *Events)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Events) UnmarshalJSON added in v2.2.3

func (e *Events) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type ExpressionLangType added in v2.2.3

type ExpressionLangType string
const (
	//JqExpressionLang ...
	JqExpressionLang ExpressionLangType = "jq"

	// JsonPathExpressionLang ...
	JsonPathExpressionLang ExpressionLangType = "jsonpath"

	// CELExpressionLang
	CELExpressionLang ExpressionLangType = "cel"
)

func (ExpressionLangType) KindValues added in v2.2.4

func (i ExpressionLangType) KindValues() []string

func (ExpressionLangType) String added in v2.2.4

func (i ExpressionLangType) String() string

type ForEachModeType added in v2.1.0

type ForEachModeType string

ForEachModeType Specifies how iterations are to be performed (sequentially or in parallel)

const (
	// ForEachModeTypeSequential specifies iterations should be done sequentially.
	ForEachModeTypeSequential ForEachModeType = "sequential"
	// ForEachModeTypeParallel specifies iterations should be done parallel.
	ForEachModeTypeParallel ForEachModeType = "parallel"
)

func (ForEachModeType) KindValues added in v2.2.3

func (f ForEachModeType) KindValues() []string

func (ForEachModeType) String added in v2.2.3

func (f ForEachModeType) String() string

type ForEachState

type ForEachState struct {
	// Workflow expression selecting an array element of the states' data.
	// +kubebuilder:validation:Required
	InputCollection string `json:"inputCollection" validate:"required"`
	// Workflow expression specifying an array element of the states data to add the results of each iteration.
	// +optional
	OutputCollection string `json:"outputCollection,omitempty"`
	// Name of the iteration parameter that can be referenced in actions/workflow. For each parallel iteration,
	// this param should contain a unique element of the inputCollection array.
	// +optional
	IterationParam string `json:"iterationParam,omitempty"`
	// Specifies how many iterations may run in parallel at the same time. Used if mode property is set to
	// parallel (default). If not specified, its value should be the size of the inputCollection.
	// +optional
	BatchSize *intstr.IntOrString `json:"batchSize,omitempty"`
	// Actions to be executed for each of the elements of inputCollection.
	// +kubebuilder:validation:MinItems=0
	Actions []Action `json:"actions,omitempty" validate:"required,min=0,dive"`
	// State specific timeout.
	// +optional
	Timeouts *ForEachStateTimeout `json:"timeouts,omitempty"`
	// Specifies how iterations are to be performed (sequential or in parallel), defaults to parallel.
	// +kubebuilder:validation:Enum=sequential;parallel
	// +kubebuilder:default=parallel
	Mode ForEachModeType `json:"mode,omitempty" validate:"required,oneofkind"`
}

ForEachState used to execute actions for each element of a data set.

func (*ForEachState) ApplyDefault added in v2.2.3

func (f *ForEachState) ApplyDefault()

ApplyDefault set the default values for ForEach State

func (*ForEachState) DeepCopy added in v2.2.0

func (in *ForEachState) DeepCopy() *ForEachState

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ForEachState.

func (*ForEachState) DeepCopyInto added in v2.2.0

func (in *ForEachState) DeepCopyInto(out *ForEachState)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ForEachState) MarshalJSON added in v2.2.3

func (f *ForEachState) MarshalJSON() ([]byte, error)

func (*ForEachState) UnmarshalJSON added in v2.2.0

func (f *ForEachState) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type ForEachStateTimeout added in v2.1.0

type ForEachStateTimeout struct {
	// Default workflow state execution timeout (ISO 8601 duration format)
	// +optional
	StateExecTimeout *StateExecTimeout `json:"stateExecTimeout,omitempty"`
	// Default single actions definition execution timeout (ISO 8601 duration format)
	// +optional
	ActionExecTimeout string `json:"actionExecTimeout,omitempty" validate:"omitempty,iso8601duration"`
}

ForEachStateTimeout defines timeout settings for foreach state

func (*ForEachStateTimeout) DeepCopy added in v2.2.0

func (in *ForEachStateTimeout) DeepCopy() *ForEachStateTimeout

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ForEachStateTimeout.

func (*ForEachStateTimeout) DeepCopyInto added in v2.2.0

func (in *ForEachStateTimeout) DeepCopyInto(out *ForEachStateTimeout)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Function

type Function struct {
	Common `json:",inline"`
	// Unique function name
	// +kubebuilder:validation:Required
	Name string `json:"name" validate:"required"`
	// If type is `rest`, <path_to_openapi_definition>#<operation_id>.
	// If type is `rpc`, <path_to_grpc_proto_file>#<service_name>#<service_method>.
	// If type is `expression`, defines the workflow expression. If the type is `custom`,
	// <path_to_custom_script>#<custom_service_method>.
	// +kubebuilder:validation:Required
	Operation string `json:"operation" validate:"required"`
	// Defines the function type. Is either `custom`, `rest`, `rpc`, `expression`, `graphql`, `odata` or `asyncapi`.
	// Default is `rest`.
	// +kubebuilder:validation:Enum=rest;rpc;expression;graphql;odata;asyncapi;custom
	// +kubebuilder:default=rest
	Type FunctionType `json:"type,omitempty" validate:"required,oneofkind"`
	// References an auth definition name to be used to access to resource defined in the operation parameter.
	// +optional
	AuthRef string `json:"authRef,omitempty"`
}

Function ...

func (*Function) ApplyDefault added in v2.2.4

func (f *Function) ApplyDefault()

ApplyDefault set the default values for Function

func (*Function) DeepCopy added in v2.2.0

func (in *Function) DeepCopy() *Function

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Function.

func (*Function) DeepCopyInto added in v2.2.0

func (in *Function) DeepCopyInto(out *Function)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Function) UnmarshalJSON added in v2.2.4

func (f *Function) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json unmarshaler interface

type FunctionRef

type FunctionRef struct {
	// Name of the referenced function.
	// +kubebuilder:validation:Required
	RefName string `json:"refName" validate:"required"`
	// Arguments (inputs) to be passed to the referenced function
	// +optional
	// TODO: validate it as required if function type is graphql
	Arguments map[string]Object `json:"arguments,omitempty"`
	// Used if function type is graphql. String containing a valid GraphQL selection set.
	// TODO: validate it as required if function type is graphql
	// +optional
	SelectionSet string `json:"selectionSet,omitempty"`
	// Specifies if the function should be invoked sync or async. Default is sync.
	// +kubebuilder:validation:Enum=async;sync
	// +kubebuilder:default=sync
	Invoke InvokeKind `json:"invoke,omitempty" validate:"required,oneofkind"`
}

FunctionRef defines the reference to a reusable function definition

func (*FunctionRef) ApplyDefault added in v2.2.3

func (f *FunctionRef) ApplyDefault()

ApplyDefault set the default values for Function Ref

func (*FunctionRef) DeepCopy added in v2.2.0

func (in *FunctionRef) DeepCopy() *FunctionRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FunctionRef.

func (*FunctionRef) DeepCopyInto added in v2.2.0

func (in *FunctionRef) DeepCopyInto(out *FunctionRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FunctionRef) UnmarshalJSON

func (f *FunctionRef) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type FunctionType

type FunctionType string

FunctionType ...

const (
	// FunctionTypeREST a combination of the function/service OpenAPI definition document URI and the particular service
	// operation that needs to be invoked, separated by a '#'.
	FunctionTypeREST FunctionType = "rest"
	// FunctionTypeRPC a combination of the gRPC proto document URI and the particular service name and service method
	// name that needs to be invoked, separated by a '#'.
	FunctionTypeRPC FunctionType = "rpc"
	// FunctionTypeExpression defines the expression syntax.
	FunctionTypeExpression FunctionType = "expression"
	// FunctionTypeGraphQL a combination of the GraphQL schema definition URI and the particular service name and
	// service method name that needs to be invoked, separated by a '#'
	FunctionTypeGraphQL FunctionType = "graphql"
	// FunctionTypeAsyncAPI a combination of the AsyncApi definition document URI and the particular service operation
	// that needs to be invoked, separated by a '#'
	FunctionTypeAsyncAPI FunctionType = "asyncapi"
	// FunctionTypeOData a combination of the GraphQL schema definition URI and the particular service name and service
	// method name that needs to be invoked, separated by a '#'
	FunctionTypeOData FunctionType = "odata"
	// FunctionTypeCustom property defines a list of function types that are set by the specification. Some runtime
	// implementations might support additional function types that extend the ones defined in the specification
	FunctionTypeCustom FunctionType = "custom"
)

func (FunctionType) KindValues added in v2.2.4

func (i FunctionType) KindValues() []string

func (FunctionType) String added in v2.2.4

func (i FunctionType) String() string

type Functions added in v2.2.3

type Functions []Function

func (Functions) DeepCopy added in v2.2.3

func (in Functions) DeepCopy() Functions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Functions.

func (Functions) DeepCopyInto added in v2.2.3

func (in Functions) DeepCopyInto(out *Functions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Functions) UnmarshalJSON added in v2.2.3

func (f *Functions) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type GrantType added in v2.1.0

type GrantType string

GrantType ...

const (
	// GrantTypePassword ...
	GrantTypePassword GrantType = "password"
	// GrantTypeClientCredentials ...
	GrantTypeClientCredentials GrantType = "clientCredentials"
	// GrantTypeTokenExchange ...
	GrantTypeTokenExchange GrantType = "tokenExchange"
)

func (GrantType) KindValues added in v2.2.4

func (i GrantType) KindValues() []string

func (GrantType) String added in v2.2.4

func (i GrantType) String() string

type InjectState

type InjectState struct {
	// JSON object which can be set as state's data input and can be manipulated via filter
	// +kubebuilder:validation:MinProperties=1
	Data map[string]Object `json:"data" validate:"required,min=1"`
	// State specific timeouts
	// +optional
	Timeouts *InjectStateTimeout `json:"timeouts,omitempty"`
}

InjectState used to inject static data into state data input.

func (*InjectState) DeepCopy added in v2.2.0

func (in *InjectState) DeepCopy() *InjectState

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InjectState.

func (*InjectState) DeepCopyInto added in v2.2.0

func (in *InjectState) DeepCopyInto(out *InjectState)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*InjectState) MarshalJSON added in v2.2.3

func (i *InjectState) MarshalJSON() ([]byte, error)

type InjectStateTimeout added in v2.1.0

type InjectStateTimeout struct {
	// Default workflow state execution timeout (ISO 8601 duration format)
	// +optional
	StateExecTimeout *StateExecTimeout `json:"stateExecTimeout,omitempty"`
}

InjectStateTimeout defines timeout settings for inject state

func (*InjectStateTimeout) DeepCopy added in v2.2.0

func (in *InjectStateTimeout) DeepCopy() *InjectStateTimeout

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InjectStateTimeout.

func (*InjectStateTimeout) DeepCopyInto added in v2.2.0

func (in *InjectStateTimeout) DeepCopyInto(out *InjectStateTimeout)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type InvokeKind added in v2.2.0

type InvokeKind string

InvokeKind defines how the target is invoked.

const (
	// InvokeKindSync meaning that worfklow execution should wait until the target completes.
	InvokeKindSync InvokeKind = "sync"
	// InvokeKindAsync meaning that workflow execution should just invoke the target and should not wait until its
	// completion.
	InvokeKindAsync InvokeKind = "async"
)

func (InvokeKind) KindValues added in v2.2.3

func (i InvokeKind) KindValues() []string

func (InvokeKind) String added in v2.2.3

func (i InvokeKind) String() string

type Metadata

type Metadata map[string]Object

Metadata information

func (Metadata) DeepCopy added in v2.2.0

func (in Metadata) DeepCopy() Metadata

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metadata.

func (Metadata) DeepCopyInto added in v2.2.0

func (in Metadata) DeepCopyInto(out *Metadata)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OAuth2AuthProperties added in v2.1.0

type OAuth2AuthProperties struct {
	Common `json:",inline"`
	// Expression referencing a workflow secret that contains all needed auth info.
	// +optional
	Secret string `json:"secret,omitempty"`
	// String or a workflow expression. Contains the authority information.
	// +optional
	Authority string `json:"authority,omitempty" validate:"omitempty,min=1"`
	// 	Defines the grant type. Can be "password", "clientCredentials", or "tokenExchange"
	// +kubebuilder:validation:Enum=password;clientCredentials;tokenExchange
	// +kubebuilder:validation:Required
	GrantType GrantType `json:"grantType" validate:"required,oneofkind"`
	// String or a workflow expression. Contains the client identifier.
	// +kubebuilder:validation:Required
	ClientID string `json:"clientId" validate:"required"`
	// Workflow secret or a workflow expression. Contains the client secret.
	// +optional
	ClientSecret string `json:"clientSecret,omitempty" validate:"omitempty,min=1"`
	// Array containing strings or workflow expressions. Contains the OAuth2 scopes.
	// +optional
	Scopes []string `json:"scopes,omitempty" validate:"omitempty,min=1"`
	// String or a workflow expression. Contains the username. Used only if grantType is 'resourceOwner'.
	// +optional
	Username string `json:"username,omitempty" validate:"omitempty,min=1"`
	// String or a workflow expression. Contains the user password. Used only if grantType is 'resourceOwner'.
	// +optional
	Password string `json:"password,omitempty" validate:"omitempty,min=1"`
	// Array containing strings or workflow expressions. Contains the OAuth2 audiences.
	// +optional
	Audiences []string `json:"audiences,omitempty" validate:"omitempty,min=1"`
	// String or a workflow expression. Contains the subject token.
	// +optional
	SubjectToken string `json:"subjectToken,omitempty" validate:"omitempty,min=1"`
	// String or a workflow expression. Contains the requested subject.
	// +optional
	RequestedSubject string `json:"requestedSubject,omitempty" validate:"omitempty,min=1"`
	// String or a workflow expression. Contains the requested issuer.
	// +optional
	RequestedIssuer string `json:"requestedIssuer,omitempty" validate:"omitempty,min=1"`
}

OAuth2AuthProperties OAuth2 information

func (*OAuth2AuthProperties) DeepCopy added in v2.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuth2AuthProperties.

func (*OAuth2AuthProperties) DeepCopyInto added in v2.2.0

func (in *OAuth2AuthProperties) DeepCopyInto(out *OAuth2AuthProperties)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Object added in v2.2.0

type Object struct {
	Type        Type   `json:"type,inline"`
	StringValue string `json:"strVal,inline"`
	IntValue    int32  `json:"intVal,inline"`
	FloatValue  float64
	MapValue    map[string]Object
	SliceValue  []Object
	BoolValue   bool `json:"boolValue,inline"`
}

Object is used to allow integration with DeepCopy tool by replacing 'interface' generic type. The DeepCopy tool allow us to easily import the Workflow types into a Kubernetes operator, which requires the DeepCopy method.

It can marshal and unmarshal any type. This object type can be three types:

  • String - holds string values
  • Integer - holds int32 values, JSON marshal any number to float64 by default, during the marshaling process it is parsed to int32

+kubebuilder:validation:Type=object

func FromBool added in v2.2.4

func FromBool(val bool) Object

func FromFloat added in v2.2.5

func FromFloat(val float64) Object

func FromInt added in v2.2.0

func FromInt(val int) Object

func FromInterface added in v2.2.5

func FromInterface(value any) Object

func FromMap added in v2.2.5

func FromMap(mapValue map[string]any) Object

func FromNull added in v2.2.5

func FromNull() Object

func FromSlice added in v2.2.5

func FromSlice(sliceValue []any) Object

func FromString added in v2.2.0

func FromString(val string) Object

func (*Object) DeepCopy added in v2.2.0

func (in *Object) DeepCopy() *Object

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Object.

func (*Object) DeepCopyInto added in v2.2.0

func (in *Object) DeepCopyInto(out *Object)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Object) MarshalJSON added in v2.2.0

func (obj Object) MarshalJSON() ([]byte, error)

MarshalJSON marshal the given json object into the respective Object subtype.

func (*Object) UnmarshalJSON added in v2.2.0

func (obj *Object) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type OnError added in v2.1.0

type OnError struct {
	// ErrorRef Reference to a unique workflow error definition. Used of errorRefs is not used
	ErrorRef string `json:"errorRef,omitempty"`
	// ErrorRefs References one or more workflow error definitions. Used if errorRef is not used
	ErrorRefs []string `json:"errorRefs,omitempty" validate:"omitempty,unique"`
	// Transition to next state to handle the error. If retryRef is defined, this transition is taken only if
	// retries were unsuccessful.
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	// +optional
	Transition *Transition `json:"transition,omitempty"`
	// End workflow execution in case of this error. If retryRef is defined, this ends workflow only if
	// retries were unsuccessful.
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	// +optional
	End *End `json:"end,omitempty"`
}

OnError ...

func (*OnError) DeepCopy added in v2.2.0

func (in *OnError) DeepCopy() *OnError

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OnError.

func (*OnError) DeepCopyInto added in v2.2.0

func (in *OnError) DeepCopyInto(out *OnError)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OnEvents

type OnEvents struct {
	// References one or more unique event names in the defined workflow events.
	// +kubebuilder:validation:MinItems=1
	EventRefs []string `json:"eventRefs" validate:"required,min=1"`
	// Should actions be performed sequentially or in parallel. Default is sequential.
	// +kubebuilder:validation:Enum=sequential;parallel
	// +kubebuilder:default=sequential
	ActionMode ActionMode `json:"actionMode,omitempty" validate:"required,oneofkind"`
	// Actions to be performed if expression matches
	// +optional
	Actions []Action `json:"actions,omitempty" validate:"dive"`
	// eventDataFilter defines the callback event data filter definition
	// +optional
	EventDataFilter EventDataFilter `json:"eventDataFilter,omitempty"`
}

OnEvents define which actions are be performed for the one or more events.

func (*OnEvents) ApplyDefault added in v2.2.3

func (o *OnEvents) ApplyDefault()

ApplyDefault set the default values for On Events

func (*OnEvents) DeepCopy added in v2.2.0

func (in *OnEvents) DeepCopy() *OnEvents

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OnEvents.

func (*OnEvents) DeepCopyInto added in v2.2.0

func (in *OnEvents) DeepCopyInto(out *OnEvents)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OnEvents) UnmarshalJSON added in v2.2.0

func (o *OnEvents) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshal OnEvents object from json bytes

type OnParentCompleteType added in v2.2.4

type OnParentCompleteType string

CompletionType define on how to complete branch execution.

const (
	OnParentCompleteTypeTerminate OnParentCompleteType = "terminate"
	OnParentCompleteTypeContinue  OnParentCompleteType = "continue"
)

func (OnParentCompleteType) KindValues added in v2.2.4

func (i OnParentCompleteType) KindValues() []string

func (OnParentCompleteType) String added in v2.2.4

func (i OnParentCompleteType) String() string

type OperationState

type OperationState struct {
	// Specifies whether actions are performed in sequence or in parallel, defaults to sequential.
	// +kubebuilder:validation:Enum=sequential;parallel
	// +kubebuilder:default=sequential
	ActionMode ActionMode `json:"actionMode,omitempty" validate:"required,oneofkind"`
	// Actions to be performed
	// +kubebuilder:validation:MinItems=0
	Actions []Action `json:"actions" validate:"min=0,dive"`
	// State specific timeouts
	// +optional
	Timeouts *OperationStateTimeout `json:"timeouts,omitempty"`
}

OperationState defines a set of actions to be performed in sequence or in parallel.

func (*OperationState) ApplyDefault added in v2.2.3

func (o *OperationState) ApplyDefault()

ApplyDefault set the default values for Operation State

func (*OperationState) DeepCopy added in v2.2.0

func (in *OperationState) DeepCopy() *OperationState

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperationState.

func (*OperationState) DeepCopyInto added in v2.2.0

func (in *OperationState) DeepCopyInto(out *OperationState)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OperationState) MarshalJSON added in v2.2.3

func (a *OperationState) MarshalJSON() ([]byte, error)

func (*OperationState) UnmarshalJSON added in v2.2.0

func (o *OperationState) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshal OperationState object from json bytes

type OperationStateTimeout added in v2.1.0

type OperationStateTimeout struct {
	// Defines workflow state execution timeout.
	// +optional
	StateExecTimeout *StateExecTimeout `json:"stateExecTimeout,omitempty"`
	// Default single actions definition execution timeout (ISO 8601 duration format)
	// +optional
	ActionExecTimeout string `json:"actionExecTimeout,omitempty" validate:"omitempty,iso8601duration"`
}

OperationStateTimeout defines the specific timeout settings for operation state

func (*OperationStateTimeout) DeepCopy added in v2.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperationStateTimeout.

func (*OperationStateTimeout) DeepCopyInto added in v2.2.0

func (in *OperationStateTimeout) DeepCopyInto(out *OperationStateTimeout)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ParallelState

type ParallelState struct {
	// List of branches for this parallel state.
	// +kubebuilder:validation:MinItems=1
	Branches []Branch `json:"branches" validate:"required,min=1,dive"`
	// Option types on how to complete branch execution. Defaults to `allOf`.
	// +kubebuilder:validation:Enum=allOf;atLeast
	// +kubebuilder:default=allOf
	CompletionType CompletionType `json:"completionType,omitempty" validate:"required,oneofkind"`
	// Used when branchCompletionType is set to atLeast to specify the least number of branches that must complete
	// in order for the state to transition/end.
	// +optional
	// TODO: change this field to unmarshal result as int
	NumCompleted intstr.IntOrString `json:"numCompleted,omitempty"`
	// State specific timeouts
	// +optional
	Timeouts *ParallelStateTimeout `json:"timeouts,omitempty"`
}

ParallelState Consists of a number of states that are executed in parallel

func (*ParallelState) ApplyDefault added in v2.2.3

func (ps *ParallelState) ApplyDefault()

ApplyDefault set the default values for Parallel State

func (*ParallelState) DeepCopy added in v2.2.0

func (in *ParallelState) DeepCopy() *ParallelState

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParallelState.

func (*ParallelState) DeepCopyInto added in v2.2.0

func (in *ParallelState) DeepCopyInto(out *ParallelState)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ParallelState) MarshalJSON added in v2.2.3

func (p *ParallelState) MarshalJSON() ([]byte, error)

func (*ParallelState) UnmarshalJSON added in v2.2.0

func (ps *ParallelState) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshal ParallelState object from json bytes

type ParallelStateTimeout added in v2.1.0

type ParallelStateTimeout struct {
	// Default workflow state execution timeout (ISO 8601 duration format)
	// +optional
	StateExecTimeout *StateExecTimeout `json:"stateExecTimeout,omitempty"`
	// Default single branch execution timeout (ISO 8601 duration format)
	// +optional
	BranchExecTimeout string `json:"branchExecTimeout,omitempty" validate:"omitempty,iso8601duration"`
}

ParallelStateTimeout defines the specific timeout settings for parallel state

func (*ParallelStateTimeout) DeepCopy added in v2.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParallelStateTimeout.

func (*ParallelStateTimeout) DeepCopyInto added in v2.2.0

func (in *ParallelStateTimeout) DeepCopyInto(out *ParallelStateTimeout)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProduceEvent

type ProduceEvent struct {
	// Reference to a defined unique event name in the events definition
	// +kubebuilder:validation:Required
	EventRef string `json:"eventRef" validate:"required"`
	// If String, expression which selects parts of the states data output to become the data of the produced event.
	// If object a custom object to become the data of produced event.
	// +optional
	Data Object `json:"data,omitempty"`
	// Add additional event extension context attributes.
	// +optional
	ContextAttributes map[string]string `json:"contextAttributes,omitempty"`
}

ProduceEvent Defines the event (CloudEvent format) to be produced when workflow execution completes or during a workflow transitions. The eventRef property must match the name of one of the defined produced events in the events definition.

func (*ProduceEvent) DeepCopy added in v2.2.0

func (in *ProduceEvent) DeepCopy() *ProduceEvent

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProduceEvent.

func (*ProduceEvent) DeepCopyInto added in v2.2.0

func (in *ProduceEvent) DeepCopyInto(out *ProduceEvent)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Retries added in v2.2.3

type Retries []Retry

func (Retries) DeepCopy added in v2.2.3

func (in Retries) DeepCopy() Retries

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Retries.

func (Retries) DeepCopyInto added in v2.2.3

func (in Retries) DeepCopyInto(out *Retries)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Retries) UnmarshalJSON added in v2.2.3

func (r *Retries) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type Retry

type Retry struct {
	// Unique retry strategy name
	// +kubebuilder:validation:Required
	Name string `json:"name" validate:"required"`
	// Time delay between retry attempts (ISO 8601 duration format)
	Delay string `json:"delay,omitempty" validate:"omitempty,iso8601duration"`
	// Maximum time delay between retry attempts (ISO 8601 duration format)
	MaxDelay string `json:"maxDelay,omitempty" validate:"omitempty,iso8601duration"`
	// Static value by which the delay increases during each attempt (ISO 8601 time format)
	Increment string `json:"increment,omitempty" validate:"omitempty,iso8601duration"`
	// Numeric value, if specified the delay between retries is multiplied by this value.
	// +optional
	Multiplier *floatstr.Float32OrString `json:"multiplier,omitempty" validate:"omitempty,min=1"`
	// Maximum number of retry attempts.
	// +kubebuilder:validation:Required
	MaxAttempts intstr.IntOrString `json:"maxAttempts" validate:"required"`
	// If float type, maximum amount of random time added or subtracted from the delay between each retry relative to total delay (between 0 and 1). If string type, absolute maximum amount of random time added or subtracted from the delay between each retry (ISO 8601 duration format)
	// TODO: make iso8601duration compatible this type
	Jitter floatstr.Float32OrString `json:"jitter,omitempty" validate:"omitempty,min=0,max=1"`
}

Retry ...

func (*Retry) ApplyDefault added in v2.2.4

func (r *Retry) ApplyDefault()

func (*Retry) DeepCopy added in v2.2.0

func (in *Retry) DeepCopy() *Retry

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Retry.

func (*Retry) DeepCopyInto added in v2.2.0

func (in *Retry) DeepCopyInto(out *Retry)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Retry) UnmarshalJSON added in v2.2.4

func (r *Retry) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type Schedule

type Schedule struct {
	// TODO Interval is required if Cron is not set and vice-versa, make a exclusive validation
	// A recurring time interval expressed in the derivative of ISO 8601 format specified below. Declares that
	// workflow instances should be automatically created at the start of each time interval in the series.
	// +optional
	Interval string `json:"interval,omitempty"`
	// Cron expression defining when workflow instances should be automatically created.
	// optional
	Cron *Cron `json:"cron,omitempty"`
	// Timezone name used to evaluate the interval & cron-expression. If the interval specifies a date-time
	// w/ timezone then proper timezone conversion will be applied. (default: UTC).
	// +optional
	Timezone string `json:"timezone,omitempty"`
}

Schedule ...

func (*Schedule) DeepCopy added in v2.2.0

func (in *Schedule) DeepCopy() *Schedule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Schedule.

func (*Schedule) DeepCopyInto added in v2.2.0

func (in *Schedule) DeepCopyInto(out *Schedule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Schedule) UnmarshalJSON

func (s *Schedule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type Secrets added in v2.1.0

type Secrets []string

Secrets allow you to access sensitive information, such as passwords, OAuth tokens, ssh keys, etc inside your Workflow Expressions.

func (Secrets) DeepCopy added in v2.2.0

func (in Secrets) DeepCopy() Secrets

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Secrets.

func (Secrets) DeepCopyInto added in v2.2.0

func (in Secrets) DeepCopyInto(out *Secrets)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Secrets) UnmarshalJSON added in v2.1.0

func (s *Secrets) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type Sleep added in v2.1.0

type Sleep struct {
	// Defines amount of time (ISO 8601 duration format) to sleep before function/subflow invocation.
	// Does not apply if 'eventRef' is defined.
	// +optional
	Before string `json:"before,omitempty" validate:"omitempty,iso8601duration"`
	// Defines amount of time (ISO 8601 duration format) to sleep after function/subflow invocation.
	// Does not apply if 'eventRef' is defined.
	// +optional
	After string `json:"after,omitempty" validate:"omitempty,iso8601duration"`
}

Sleep defines time periods workflow execution should sleep before & after function execution

func (*Sleep) DeepCopy added in v2.2.0

func (in *Sleep) DeepCopy() *Sleep

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sleep.

func (*Sleep) DeepCopyInto added in v2.2.0

func (in *Sleep) DeepCopyInto(out *Sleep)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Sleep) UnmarshalJSON added in v2.2.3

func (s *Sleep) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type SleepState added in v2.1.0

type SleepState struct {
	// Duration (ISO 8601 duration format) to sleep
	// +kubebuilder:validation:Required
	Duration string `json:"duration" validate:"required,iso8601duration"`
	// Timeouts State specific timeouts
	// +optional
	Timeouts *SleepStateTimeout `json:"timeouts,omitempty"`
}

SleepState suspends workflow execution for a given time duration.

func (*SleepState) DeepCopy added in v2.2.0

func (in *SleepState) DeepCopy() *SleepState

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SleepState.

func (*SleepState) DeepCopyInto added in v2.2.0

func (in *SleepState) DeepCopyInto(out *SleepState)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SleepState) MarshalJSON added in v2.2.3

func (s *SleepState) MarshalJSON() ([]byte, error)

type SleepStateTimeout added in v2.1.0

type SleepStateTimeout struct {
	// Default workflow state execution timeout (ISO 8601 duration format)
	// +optional
	StateExecTimeout *StateExecTimeout `json:"stateExecTimeout,omitempty"`
}

SleepStateTimeout defines timeout settings for sleep state

func (*SleepStateTimeout) DeepCopy added in v2.2.0

func (in *SleepStateTimeout) DeepCopy() *SleepStateTimeout

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SleepStateTimeout.

func (*SleepStateTimeout) DeepCopyInto added in v2.2.0

func (in *SleepStateTimeout) DeepCopyInto(out *SleepStateTimeout)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Start

type Start struct {
	// Name of the starting workflow state
	// +kubebuilder:validation:Required
	StateName string `json:"stateName" validate:"required"`
	// Define the recurring time intervals or cron expressions at which workflow instances should be automatically
	// started.
	// +optional
	Schedule *Schedule `json:"schedule,omitempty" validate:"omitempty"`
}

Start definition

func (*Start) DeepCopy added in v2.2.0

func (in *Start) DeepCopy() *Start

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Start.

func (*Start) DeepCopyInto added in v2.2.0

func (in *Start) DeepCopyInto(out *Start)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Start) UnmarshalJSON

func (s *Start) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type State

type State struct {
	BaseState `json:",inline"`
	// delayState Causes the workflow execution to delay for a specified duration.
	// +optional
	*DelayState `json:"delayState,omitempty"`
	// event states await one or more events and perform actions when they are received. If defined as the
	// workflow starting state, the event state definition controls when the workflow instances should be created.
	// +optional
	*EventState `json:"eventState,omitempty"`
	// operationState defines a set of actions to be performed in sequence or in parallel.
	// +optional
	*OperationState `json:"operationState,omitempty"`
	// parallelState Consists of a number of states that are executed in parallel.
	// +optional
	*ParallelState `json:"parallelState,omitempty"`
	// switchState is workflow's gateways: direct transitions onf a workflow based on certain conditions.
	// +optional
	*SwitchState `json:"switchState,omitempty"`
	// forEachState used to execute actions for each element of a data set.
	// +optional
	*ForEachState `json:"forEachState,omitempty"`
	// injectState used to inject static data into state data input.
	// +optional
	*InjectState `json:"injectState,omitempty"`
	// callbackState executes a function and waits for callback event that indicates completion of the task.
	// +optional
	*CallbackState `json:"callbackState,omitempty"`
	// sleepState suspends workflow execution for a given time duration.
	// +optional
	*SleepState `json:"sleepState,omitempty"`
}

func (*State) DeepCopy added in v2.2.3

func (in *State) DeepCopy() *State

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new State.

func (*State) DeepCopyInto added in v2.2.3

func (in *State) DeepCopyInto(out *State)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*State) MarshalJSON added in v2.2.3

func (s *State) MarshalJSON() ([]byte, error)

func (*State) UnmarshalJSON added in v2.2.3

func (s *State) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type StateDataFilter

type StateDataFilter struct {
	// Workflow expression to filter the state data input
	Input string `json:"input,omitempty"`
	// Workflow expression that filters the state data output
	Output string `json:"output,omitempty"`
}

StateDataFilter ...

func (*StateDataFilter) DeepCopy added in v2.2.0

func (in *StateDataFilter) DeepCopy() *StateDataFilter

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StateDataFilter.

func (*StateDataFilter) DeepCopyInto added in v2.2.0

func (in *StateDataFilter) DeepCopyInto(out *StateDataFilter)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StateExecTimeout added in v2.1.0

type StateExecTimeout struct {
	// Single state execution timeout, not including retries (ISO 8601 duration format)
	// +optional
	Single string `json:"single,omitempty" validate:"omitempty,iso8601duration"`
	// Total state execution timeout, including retries (ISO 8601 duration format)
	// +kubebuilder:validation:Required
	Total string `json:"total" validate:"required,iso8601duration"`
}

StateExecTimeout defines workflow state execution timeout

func (*StateExecTimeout) DeepCopy added in v2.2.0

func (in *StateExecTimeout) DeepCopy() *StateExecTimeout

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StateExecTimeout.

func (*StateExecTimeout) DeepCopyInto added in v2.2.0

func (in *StateExecTimeout) DeepCopyInto(out *StateExecTimeout)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*StateExecTimeout) UnmarshalJSON added in v2.1.0

func (s *StateExecTimeout) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshal StateExecTimeout object from json bytes

type StateType

type StateType string

StateType ...

const (
	// StateTypeDelay ...
	StateTypeDelay StateType = "delay"
	// StateTypeEvent ...
	StateTypeEvent StateType = "event"
	// StateTypeOperation ...
	StateTypeOperation StateType = "operation"
	// StateTypeParallel ...
	StateTypeParallel StateType = "parallel"
	// StateTypeSwitch ...
	StateTypeSwitch StateType = "switch"
	// StateTypeForEach ...
	StateTypeForEach StateType = "foreach"
	// StateTypeInject ...
	StateTypeInject StateType = "inject"
	// StateTypeCallback ...
	StateTypeCallback StateType = "callback"
	// StateTypeSleep ...
	StateTypeSleep StateType = "sleep"
)

func (StateType) KindValues added in v2.2.3

func (s StateType) KindValues() []string

func (StateType) String added in v2.2.3

func (s StateType) String() string

type States added in v2.2.3

type States []State

+kubebuilder:validation:MinItems=1

func (States) DeepCopy added in v2.2.3

func (in States) DeepCopy() States

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new States.

func (States) DeepCopyInto added in v2.2.3

func (in States) DeepCopyInto(out *States)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*States) UnmarshalJSON added in v2.2.3

func (s *States) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type SwitchState added in v2.2.0

type SwitchState struct {

	// Default transition of the workflow if there is no matching data conditions. Can include a transition or
	// end definition.
	DefaultCondition DefaultCondition `json:"defaultCondition"`
	// Defines conditions evaluated against events.
	// +optional
	EventConditions EventConditions `json:"eventConditions" validate:"dive"`
	// Defines conditions evaluated against data
	// +optional
	DataConditions []DataCondition `json:"dataConditions" validate:"dive"`
	// SwitchState specific timeouts
	// +optional
	Timeouts *SwitchStateTimeout `json:"timeouts,omitempty"`
}

SwitchState is workflow's gateways: direct transitions onf a workflow based on certain conditions.

func (*SwitchState) DeepCopy added in v2.2.0

func (in *SwitchState) DeepCopy() *SwitchState

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwitchState.

func (*SwitchState) DeepCopyInto added in v2.2.0

func (in *SwitchState) DeepCopyInto(out *SwitchState)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SwitchState) MarshalJSON added in v2.2.3

func (s *SwitchState) MarshalJSON() ([]byte, error)

type SwitchStateTimeout added in v2.2.0

type SwitchStateTimeout struct {
	// Default workflow state execution timeout (ISO 8601 duration format)
	// +optional
	StateExecTimeout *StateExecTimeout `json:"stateExecTimeout,omitempty"`
	// Specify the expire value to transitions to defaultCondition. When event-based conditions do not arrive.
	// NOTE: this is only available for EventConditions
	// +optional
	EventTimeout string `json:"eventTimeout,omitempty" validate:"omitempty,iso8601duration"`
}

SwitchStateTimeout defines the specific timeout settings for switch state

func (*SwitchStateTimeout) DeepCopy added in v2.2.0

func (in *SwitchStateTimeout) DeepCopy() *SwitchStateTimeout

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwitchStateTimeout.

func (*SwitchStateTimeout) DeepCopyInto added in v2.2.0

func (in *SwitchStateTimeout) DeepCopyInto(out *SwitchStateTimeout)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Timeouts added in v2.1.0

type Timeouts struct {
	// WorkflowExecTimeout Workflow execution timeout duration (ISO 8601 duration format). If not specified should
	// be 'unlimited'.
	// +optional
	WorkflowExecTimeout *WorkflowExecTimeout `json:"workflowExecTimeout,omitempty"`
	// StateExecTimeout Total state execution timeout (including retries) (ISO 8601 duration format).
	// +optional
	StateExecTimeout *StateExecTimeout `json:"stateExecTimeout,omitempty"`
	// ActionExecTimeout Single actions definition execution timeout duration (ISO 8601 duration format).
	// +optional
	ActionExecTimeout string `json:"actionExecTimeout,omitempty" validate:"omitempty,min=1"`
	// BranchExecTimeout Single branch execution timeout duration (ISO 8601 duration format).
	// +optional
	BranchExecTimeout string `json:"branchExecTimeout,omitempty" validate:"omitempty,min=1"`
	// EventTimeout Timeout duration to wait for consuming defined events (ISO 8601 duration format).
	// +optional
	EventTimeout string `json:"eventTimeout,omitempty" validate:"omitempty,min=1"`
}

Timeouts ...

func (*Timeouts) DeepCopy added in v2.2.0

func (in *Timeouts) DeepCopy() *Timeouts

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Timeouts.

func (*Timeouts) DeepCopyInto added in v2.2.0

func (in *Timeouts) DeepCopyInto(out *Timeouts)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Timeouts) UnmarshalJSON added in v2.1.0

func (t *Timeouts) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type Transition

type Transition struct {

	// Name of the state to transition to next.
	// +kubebuilder:validation:Required
	NextState string `json:"nextState" validate:"required,min=1"`
	// Array of producedEvent definitions. Events to be produced before the transition takes place.
	// +optional
	ProduceEvents []ProduceEvent `json:"produceEvents,omitempty" validate:"omitempty,dive"`
	// If set to true, triggers workflow compensation before this transition is taken. Default is false.
	// +kubebuilder:default=false
	// +optional
	Compensate bool `json:"compensate,omitempty"`
	// contains filtered or unexported fields
}

Transition Serverless workflow states can have one or more incoming and outgoing transitions (from/to other states). Each state can define a transition definition that is used to determine which state to transition to next.

func (*Transition) DeepCopy added in v2.2.0

func (in *Transition) DeepCopy() *Transition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Transition.

func (*Transition) DeepCopyInto added in v2.2.0

func (in *Transition) DeepCopyInto(out *Transition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Transition) UnmarshalJSON

func (t *Transition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type Type added in v2.2.3

type Type int8
const (
	Null Type = iota
	String
	Int
	Float
	Map
	Slice
	Bool
)

type ValidatorContext added in v2.2.4

type ValidatorContext struct {
	States    map[string]State
	Functions map[string]Function
	Events    map[string]Event
	Retries   map[string]Retry
	Errors    map[string]Error
}

func (*ValidatorContext) DeepCopy added in v2.2.4

func (in *ValidatorContext) DeepCopy() *ValidatorContext

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatorContext.

func (*ValidatorContext) DeepCopyInto added in v2.2.4

func (in *ValidatorContext) DeepCopyInto(out *ValidatorContext)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ValidatorContext) ExistError added in v2.2.4

func (c *ValidatorContext) ExistError(name string) bool

func (*ValidatorContext) ExistEvent added in v2.2.4

func (c *ValidatorContext) ExistEvent(name string) bool

func (*ValidatorContext) ExistFunction added in v2.2.4

func (c *ValidatorContext) ExistFunction(name string) bool

func (*ValidatorContext) ExistRetry added in v2.2.4

func (c *ValidatorContext) ExistRetry(name string) bool

func (*ValidatorContext) ExistState added in v2.2.4

func (c *ValidatorContext) ExistState(name string) bool

type Workflow

type Workflow struct {
	BaseWorkflow `json:",inline"`
	// +kubebuilder:pruning:PreserveUnknownFields
	States States `json:"states" validate:"min=1,unique=Name,dive"`
	// +optional
	Events Events `json:"events,omitempty" validate:"unique=Name,dive"`
	// +optional
	Functions Functions `json:"functions,omitempty" validate:"unique=Name,dive"`
	// +optional
	Retries Retries `json:"retries,omitempty" validate:"unique=Name,dive"`
}

Workflow base definition

func (*Workflow) ApplyDefault added in v2.2.3

func (w *Workflow) ApplyDefault()

ApplyDefault set the default values for Workflow

func (*Workflow) DeepCopy added in v2.2.0

func (in *Workflow) DeepCopy() *Workflow

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workflow.

func (*Workflow) DeepCopyInto added in v2.2.0

func (in *Workflow) DeepCopyInto(out *Workflow)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Workflow) UnmarshalJSON

func (w *Workflow) UnmarshalJSON(data []byte) error

UnmarshalJSON implementation for json Unmarshal function for the Workflow type

type WorkflowExecTimeout added in v2.1.0

type WorkflowExecTimeout struct {
	// Workflow execution timeout duration (ISO 8601 duration format). If not specified should be 'unlimited'.
	// +kubebuilder:default=unlimited
	Duration string `json:"duration" validate:"required,min=1,iso8601duration"`
	// If false, workflow instance is allowed to finish current execution. If true, current workflow execution
	// is stopped immediately. Default is false.
	// +optional
	Interrupt bool `json:"interrupt,omitempty"`
	// Name of a workflow state to be executed before workflow instance is terminated.
	// +optional
	RunBefore string `json:"runBefore,omitempty" validate:"omitempty,min=1"`
}

WorkflowExecTimeout property defines the workflow execution timeout. It is defined using the ISO 8601 duration format. If not defined, the workflow execution should be given "unlimited" amount of time to complete.

func (*WorkflowExecTimeout) ApplyDefault added in v2.2.3

func (w *WorkflowExecTimeout) ApplyDefault()

ApplyDefault set the default values for Workflow Exec Timeout

func (*WorkflowExecTimeout) DeepCopy added in v2.2.0

func (in *WorkflowExecTimeout) DeepCopy() *WorkflowExecTimeout

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowExecTimeout.

func (*WorkflowExecTimeout) DeepCopyInto added in v2.2.0

func (in *WorkflowExecTimeout) DeepCopyInto(out *WorkflowExecTimeout)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WorkflowExecTimeout) UnmarshalJSON added in v2.1.0

func (w *WorkflowExecTimeout) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type WorkflowRef added in v2.1.0

type WorkflowRef struct {
	// Sub-workflow unique id
	// +kubebuilder:validation:Required
	WorkflowID string `json:"workflowId" validate:"required"`
	// Sub-workflow version
	// +optional
	Version string `json:"version,omitempty"`
	// Specifies if the subflow should be invoked sync or async.
	// Defaults to sync.
	// +kubebuilder:validation:Enum=async;sync
	// +kubebuilder:default=sync
	// +optional
	Invoke InvokeKind `json:"invoke,omitempty" validate:"required,oneofkind"`
	// onParentComplete specifies how subflow execution should behave when parent workflow completes if invoke
	// is 'async'. Defaults to terminate.
	// +kubebuilder:validation:Enum=terminate;continue
	// +kubebuilder:default=terminate
	OnParentComplete OnParentCompleteType `json:"onParentComplete,omitempty" validate:"required,oneofkind"`
}

WorkflowRef holds a reference for a workflow definition

func (*WorkflowRef) ApplyDefault added in v2.2.3

func (s *WorkflowRef) ApplyDefault()

ApplyDefault set the default values for Workflow Ref

func (*WorkflowRef) DeepCopy added in v2.2.0

func (in *WorkflowRef) DeepCopy() *WorkflowRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowRef.

func (*WorkflowRef) DeepCopyInto added in v2.2.0

func (in *WorkflowRef) DeepCopyInto(out *WorkflowRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WorkflowRef) UnmarshalJSON added in v2.1.0

func (s *WorkflowRef) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type WorkflowValidator added in v2.2.4

type WorkflowValidator func(mapValues ValidatorContext, sl validator.StructLevel)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL