model

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: Apache-2.0 Imports: 17 Imported by: 29

Documentation

Index

Constants

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

	// UnlimitedTimeout description for unlimited timeouts
	UnlimitedTimeout = "unlimited"
)

Variables

View Source
var FALSE = false

FALSE used by bool fields that needs a boolean pointer

View Source
var TRUE = true

TRUE used by bool fields that needs a boolean pointer

Functions

func BaseWorkflowStructLevelValidation added in v2.2.0

func BaseWorkflowStructLevelValidation(structLevel validator.StructLevel)

BaseWorkflowStructLevelValidation custom validator for unique name of the auth methods

func DataConditionStructLevelValidation added in v2.2.0

func DataConditionStructLevelValidation(ctx context.Context, structLevel validator.StructLevel)

DataConditionStructLevelValidation custom validator for DataCondition

func DefaultConditionStructLevelValidation added in v2.2.0

func DefaultConditionStructLevelValidation(ctx context.Context, structLevel validator.StructLevel)

DefaultConditionStructLevelValidation custom validator for DefaultCondition

func EventConditionStructLevelValidation added in v2.2.0

func EventConditionStructLevelValidation(ctx context.Context, structLevel validator.StructLevel)

EventConditionStructLevelValidation custom validator for EventCondition

func EventStructLevelValidation

func EventStructLevelValidation(structLevel validator.StructLevel)

EventStructLevelValidation custom validator for event kind consumed

func ForEachStateStructLevelValidation added in v2.2.0

func ForEachStateStructLevelValidation(_ context.Context, structLevel validator.StructLevel)

ForEachStateStructLevelValidation custom validator for ForEachState

func IncludePaths added in v2.2.0

func IncludePaths() []string

IncludePaths will return the search path for non-absolute import file

func ParallelStateStructLevelValidation added in v2.2.0

func ParallelStateStructLevelValidation(_ context.Context, structLevel validator.StructLevel)

ParallelStateStructLevelValidation custom validator for ParallelState

func RetryStructLevelValidation added in v2.2.0

func RetryStructLevelValidation(structLevel validator.StructLevel)

RetryStructLevelValidation custom validator for Retry Struct

func SetIncludePaths added in v2.2.0

func SetIncludePaths(paths []string)

SetIncludePaths will update the search path for non-absolute import file

func SwitchStateStructLevelValidation added in v2.2.0

func SwitchStateStructLevelValidation(ctx context.Context, structLevel validator.StructLevel)

SwitchStateStructLevelValidation custom validator for SwitchState

Types

type Action

type Action struct {
	// ID defines Unique action identifier
	ID string `json:"id,omitempty"`
	// Name defines Unique action definition name
	Name string `json:"name,omitempty"`
	// FunctionRef references a reusable function definition
	FunctionRef *FunctionRef `json:"functionRef,omitempty"`
	// EventRef references a 'trigger' and 'result' reusable event definitions
	EventRef *EventRef `json:"eventRef,omitempty"`
	// References a sub-workflow to be executed
	SubFlowRef *WorkflowRef `json:"subFlowRef,omitempty"`
	// Sleep Defines time period workflow execution should sleep before / after function execution
	Sleep Sleep `json:"sleep,omitempty"`
	// RetryRef References a defined workflow retry definition. If not defined the default retry policy is assumed
	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`
	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`
	RetryableErrors []string `json:"retryableErrors,omitempty" validate:"omitempty,min=1"`
	// Action data filter
	ActionDataFilter ActionDataFilter `json:"actionDataFilter,omitempty"`
	// Workflow expression evaluated against state data. Must evaluate to true or false
	Condition string `json:"condition,omitempty"`
}

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

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 selects state data that the state action can use
	FromStateData string `json:"fromStateData,omitempty"`

	// UseResults represent where action data results is added/merged to state data. If it's false, results & toStateData should be ignored.
	// Defaults to true.
	UseResults bool `json:"useResults,omitempty"`

	// Workflow expression that filters the actions' data results
	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, denote, the top-level state data element
	ToStateData string `json:"toStateData,omitempty"`
}

ActionDataFilter used to filter action data results.

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 (f *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"
)

type Auth added in v2.1.0

type Auth struct {
	// Name Unique auth definition name
	Name string `json:"name" validate:"required"`
	// Scheme Defines the auth type
	Scheme AuthType `json:"scheme,omitempty" validate:"omitempty,min=1"`
	// Properties ...
	Properties AuthProperties `json:"properties" validate:"required"`
}

Auth ...

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) UnmarshalJSON added in v2.1.0

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

UnmarshalJSON Auth definition

type AuthArray added in v2.2.0

type AuthArray []Auth

func (AuthArray) DeepCopy added in v2.2.0

func (in AuthArray) DeepCopy() AuthArray

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

func (AuthArray) DeepCopyInto added in v2.2.0

func (in AuthArray) DeepCopyInto(out *AuthArray)

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

func (*AuthArray) UnmarshalJSON added in v2.2.0

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

type AuthProperties added in v2.1.0

type AuthProperties interface {
	// GetMetadata ...
	GetMetadata() *Metadata
	// GetSecret ...
	GetSecret() string
	// DeepCopyAuthProperties fixes in.Properties.DeepCopyAuthProperties undefined (type AuthProperties has no
	// field or method DeepCopyAuthProperties)
	DeepCopyAuthProperties() AuthProperties
}

AuthProperties ...

type AuthType added in v2.1.0

type AuthType string

AuthType ...

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

type BaseAuthProperties added in v2.1.0

type BaseAuthProperties struct {
	Common
	// Secret Expression referencing a workflow secret that contains all needed auth info
	Secret string `json:"secret,omitempty"`
}

BaseAuthProperties ...

func (*BaseAuthProperties) DeepCopy added in v2.2.0

func (in *BaseAuthProperties) DeepCopy() *BaseAuthProperties

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

func (*BaseAuthProperties) DeepCopyInto added in v2.2.0

func (in *BaseAuthProperties) DeepCopyInto(out *BaseAuthProperties)

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

func (*BaseAuthProperties) GetMetadata added in v2.1.0

func (b *BaseAuthProperties) GetMetadata() *Metadata

GetMetadata ...

func (*BaseAuthProperties) GetSecret added in v2.1.0

func (b *BaseAuthProperties) GetSecret() string

GetSecret ...

func (*BaseAuthProperties) UnmarshalJSON added in v2.1.0

func (b *BaseAuthProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON ...

type BaseState

type BaseState struct {
	// Unique State id
	ID string `json:"id,omitempty"`
	// State name
	Name string `json:"name" validate:"required"`
	// State type
	Type StateType `json:"type" validate:"required"`
	// States error handling and retries definitions
	OnErrors []OnError `json:"onErrors,omitempty"  validate:"omitempty,dive"`
	// Next transition of the workflow after the time delay
	Transition *Transition `json:"transition,omitempty"`
	// State data filter
	StateDataFilter *StateDataFilter `json:"stateDataFilter,omitempty"`
	// Unique Name of a workflow state which is responsible for compensation of this state
	CompensatedBy string `json:"compensatedBy,omitempty"`
	// If true, this state is used to compensate another state. Default is false
	UsedForCompensation bool `json:"usedForCompensation,omitempty"`
	// State end definition
	End      *End      `json:"end,omitempty"`
	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) GetCompensatedBy

func (s *BaseState) GetCompensatedBy() string

GetCompensatedBy ...

func (*BaseState) GetEnd

func (s *BaseState) GetEnd() *End

GetEnd ...

func (*BaseState) GetID

func (s *BaseState) GetID() string

GetID ...

func (*BaseState) GetMetadata

func (s *BaseState) GetMetadata() *Metadata

GetMetadata ...

func (*BaseState) GetName

func (s *BaseState) GetName() string

GetName ...

func (*BaseState) GetOnErrors

func (s *BaseState) GetOnErrors() []OnError

GetOnErrors ...

func (*BaseState) GetStateDataFilter

func (s *BaseState) GetStateDataFilter() *StateDataFilter

GetStateDataFilter ...

func (*BaseState) GetTransition

func (s *BaseState) GetTransition() *Transition

GetTransition ...

func (*BaseState) GetType

func (s *BaseState) GetType() StateType

GetType ...

func (*BaseState) GetUsedForCompensation

func (s *BaseState) GetUsedForCompensation() bool

GetUsedForCompensation ...

type BaseWorkflow

type BaseWorkflow struct {
	// Workflow unique identifier
	ID string `json:"id" validate:"omitempty,min=1"`
	// Key Domain-specific workflow identifier
	Key string `json:"key,omitempty" validate:"omitempty,min=1"`
	// Workflow name
	Name string `json:"name,omitempty"`
	// Workflow description
	Description string `json:"description,omitempty"`
	// Workflow version
	Version string `json:"version" validate:"omitempty,min=1"`
	Start   *Start `json:"start,omitempty"`
	// Annotations List of helpful terms describing the workflows intended purpose, subject areas, or other important qualities
	Annotations []string `json:"annotations,omitempty"`
	// DataInputSchema URI of the JSON Schema used to validate the workflow data input
	DataInputSchema *DataInputSchema `json:"dataInputSchema,omitempty"`
	// Serverless Workflow schema version
	SpecVersion string `json:"specVersion,omitempty" validate:"required"`
	// Secrets allow you to access sensitive information, such as passwords, OAuth tokens, ssh keys, etc inside your Workflow Expressions.
	Secrets Secrets `json:"secrets,omitempty"`
	// Constants Workflow constants are used to define static, and immutable, data which is available to Workflow Expressions.
	Constants *Constants `json:"constants,omitempty"`
	// Identifies the expression language used for workflow expressions. Default is 'jq'
	ExpressionLang string `json:"expressionLang,omitempty" validate:"omitempty,min=1"`
	// Timeouts definition for Workflow, State, Action, Branch, and Event consumption.
	Timeouts *Timeouts `json:"timeouts,omitempty"`
	// Errors declarations for this Workflow definition
	Errors []Error `json:"errors,omitempty"`
	// If 'true', workflow instances is not terminated when there are no active execution paths. Instance can be terminated via 'terminate end definition' or reaching defined 'execTimeout'
	KeepActive bool `json:"keepActive,omitempty"`
	// Metadata custom information shared with the runtime
	Metadata Metadata `json:"metadata,omitempty"`
	// AutoRetries If set to true, actions should automatically be retried on unchecked errors. Default is false
	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.
	Auth AuthArray `json:"auth,omitempty" validate:"omitempty"`
}

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 {
	BaseAuthProperties
	// Username String or a workflow expression. Contains the username
	Username string `json:"username" validate:"required"`
	// Password String or a workflow expression. Contains the user password
	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) DeepCopyAuthProperties added in v2.2.0

func (b *BasicAuthProperties) DeepCopyAuthProperties() AuthProperties

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.

func (*BasicAuthProperties) UnmarshalJSON added in v2.1.0

func (b *BasicAuthProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON ...

type BearerAuthProperties added in v2.1.0

type BearerAuthProperties struct {
	BaseAuthProperties
	// Token String or a workflow expression. Contains the token
	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) DeepCopyAuthProperties added in v2.2.0

func (b *BearerAuthProperties) DeepCopyAuthProperties() AuthProperties

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.

func (*BearerAuthProperties) UnmarshalJSON added in v2.1.0

func (b *BearerAuthProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON ...

type Branch

type Branch struct {
	// Branch name
	Name string `json:"name" validate:"required"`
	// Actions to be executed in this branch
	Actions []Action `json:"actions" validate:"required,min=1,dive"`
	// Timeouts State specific timeouts
	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 {
	// ActionExecTimeout Single actions definition execution timeout duration (ISO 8601 duration format)
	ActionExecTimeout string `json:"actionExecTimeout,omitempty" validate:"omitempty,iso8601duration"`
	// BranchExecTimeout Single branch execution timeout duration (ISO 8601 duration format)
	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 {
	BaseState
	// Defines the action to be executed
	Action Action `json:"action" validate:"required"`
	// References a unique callback event name in the defined workflow events
	EventRef string `json:"eventRef" validate:"required"`
	// Time period to wait for incoming events (ISO 8601 format)
	Timeouts *CallbackStateTimeout `json:"timeouts" validate:"omitempty"`
	// Event data filter
	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) DeepCopyState added in v2.2.0

func (in *CallbackState) DeepCopyState() State

type CallbackStateTimeout added in v2.1.0

type CallbackStateTimeout struct {
	StateExecTimeout  *StateExecTimeout `json:"stateExecTimeout,omitempty"`
	ActionExecTimeout string            `json:"actionExecTimeout,omitempty" validate:"omitempty,iso8601duration"`
	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
	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"
)

type Constants added in v2.1.0

type Constants struct {
	// Data represents the generic structure of the constants value
	Data map[string]json.RawMessage `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 ...

type ContinueAs added in v2.1.0

type ContinueAs struct {
	// Unique id of the workflow to continue execution as.
	WorkflowID string `json:"workflowId" validate:"required"`
	// Version of the workflow to continue execution as.
	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
	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
	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

type Correlation

type Correlation struct {
	// CloudEvent Extension Context Attribute name
	ContextAttributeName string `json:"contextAttributeName" validate:"required"`
	// CloudEvent Extension Context Attribute value
	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 {
	// Repeating interval (cron expression) describing when the workflow instance should be created
	Expression string `json:"expression" validate:"required"`
	// Specific date and time (ISO 8601 format) when the cron expression invocation is no longer valid
	ValidUntil string `json:"validUntil,omitempty"`
}

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
	Name string `json:"name,omitempty"`
	// Workflow expression evaluated against state data. Must evaluate to true or false
	Condition string   `json:"condition" validate:"required"`
	Metadata  Metadata `json:"metadata,omitempty"`

	// Explicit transition to end
	End *End `json:"end" validate:"omitempty"`
	// Workflow transition if condition is evaluated to true
	Transition *Transition `json:"transition" 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 {
	Schema                 string `json:"schema" validate:"required"`
	FailOnValidationErrors *bool  `json:"failOnValidationErrors" validate:"required"`
}

DataInputSchema ...

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 ...

type DefaultCondition added in v2.1.0

type DefaultCondition struct {
	Transition *Transition `json:"transition,omitempty"`
	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.

type DelayState

type DelayState struct {
	BaseState
	// Amount of time (ISO 8601 format) to delay
	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) DeepCopyState added in v2.2.0

func (in *DelayState) DeepCopyState() State

type End

type End struct {
	// If true, completes all execution flows in the given workflow instance
	Terminate bool `json:"terminate,omitempty"`
	// Defines events that should be produced
	ProduceEvents []ProduceEvent `json:"produceEvents,omitempty"`
	// If set to true, triggers workflow compensation. Default is false
	Compensate bool        `json:"compensate,omitempty"`
	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 ...

type Error

type Error struct {
	// Name Domain-specific error name
	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 '*'
	Code string `json:"code,omitempty" validate:"omitempty,min=1"`
	// OnError description
	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 Event

type Event struct {
	Common
	// Unique event name
	Name string `json:"name" validate:"required"`
	// CloudEvent source
	Source string `json:"source,omitempty"`
	// CloudEvent type
	Type string `json:"type" validate:"required"`
	// Defines the CloudEvent as either 'consumed' or 'produced' by the workflow.
	// Defaults to `consumed`
	Kind EventKind `json:"kind,omitempty"`
	// 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
	DataOnly bool `json:"dataOnly,omitempty"`
	// CloudEvent correlation definitions
	Correlation []Correlation `json:"correlation,omitempty" validate:"omitempty,dive"`
}

Event used to define events and their correlations

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
	Name string `json:"name,omitempty"`
	// References a unique event name in the defined workflow events
	EventRef string `json:"eventRef" validate:"required"`
	// Event data filter definition
	EventDataFilter EventDataFilter `json:"eventDataFilter,omitempty"`
	Metadata        Metadata        `json:"metadata,omitempty"`

	// Explicit transition to end
	End *End `json:"end" validate:"omitempty"`
	// Workflow transition if condition is evaluated to true
	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 EventDataFilter

type EventDataFilter struct {
	// UseData represent where event payload is added/merged to state data. If it's false, data & toStateData should be ignored.
	// Defaults to true.
	UseData bool `json:"useData,omitempty"`

	// Workflow expression that filters of the event data (payload)
	Data string `json:"data,omitempty"`
	// Workflow expression that selects a state data element to which the event payload should be added/merged into. If not specified, denotes, the top-level state data element.
	ToStateData string `json:"toStateData,omitempty"`
}

EventDataFilter used to filter consumed event payloads.

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

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"
)

type EventRef

type EventRef struct {
	// Reference to the unique name of a 'produced' event definition
	TriggerEventRef string `json:"triggerEventRef" validate:"required"`
	// Reference to the unique name of a 'consumed' event definition
	ResultEventRef string `json:"resultEventRef" validate:"required"`
	// ResultEventTimeout defines maximum amount of time (ISO 8601 format) to wait for the result event. If not defined it be set to the actionExecutionTimeout
	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'.
	Data Object `json:"data,omitempty"`
	// Add additional extension context attributes to the produced event
	ContextAttributes map[string]Object `json:"contextAttributes,omitempty"`
	// Invoke specifies if the subflow should be invoked sync or async.
	// Defaults to sync.
	Invoke InvokeKind `json:"invoke,omitempty" validate:"required,oneof=async sync"`
}

EventRef defining invocation of a function via event

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 {
	// TODO: EventState doesn't have usedForCompensation field.
	BaseState

	// 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
	Exclusive bool `json:"exclusive,omitempty"`
	// Define the events to be consumed and optional actions to be performed
	OnEvents []OnEvents `json:"onEvents" validate:"required,min=1,dive"`
	// State specific timeouts
	Timeouts *EventStateTimeout `json:"timeouts,omitempty"`
}

EventState used to wait for events from event sources, then consumes them and invoke one or more actions to run in sequence or parallel

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) DeepCopyState added in v2.2.0

func (e *EventState) DeepCopyState() State

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 {
	StateExecTimeout  *StateExecTimeout `json:"stateExecTimeout,omitempty"`
	ActionExecTimeout string            `json:"actionExecTimeout,omitempty" validate:"omitempty,iso8601duration"`
	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 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"
)

type ForEachState

type ForEachState struct {
	BaseState
	// Workflow expression selecting an array element of the states data
	InputCollection string `json:"inputCollection" validate:"required"`
	// Workflow expression specifying an array element of the states data to add the results of each iteration
	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 an unique element of the inputCollection array
	IterationParam string `json:"iterationParam,omitempty"`
	// Specifies how upper bound on how many iterations may run in parallel
	BatchSize *intstr.IntOrString `json:"batchSize,omitempty"`
	// Actions to be executed for each of the elements of inputCollection
	Actions []Action `json:"actions,omitempty" validate:"required,min=1,dive"`
	// State specific timeout
	Timeouts *ForEachStateTimeout `json:"timeouts,omitempty"`
	// Mode Specifies how iterations are to be performed (sequentially or in parallel)
	// Defaults to parallel
	Mode ForEachModeType `json:"mode,omitempty"`
}

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

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) DeepCopyState added in v2.2.0

func (f *ForEachState) DeepCopyState() State

func (*ForEachState) UnmarshalJSON added in v2.2.0

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

type ForEachStateTimeout added in v2.1.0

type ForEachStateTimeout struct {
	StateExecTimeout  *StateExecTimeout `json:"stateExecTimeout,omitempty"`
	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
	// Unique function name
	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>.
	Operation string `json:"operation" validate:"required"`
	// Defines the function type. Is either `rest`, `rpc`, `expression`, `graphql`, `asyncapi`, `odata` or `custom`. Default is `rest`
	Type FunctionType `json:"type,omitempty"`
	// References an auth definition name to be used to access to resource defined in the operation parameter
	AuthRef string `json:"authRef,omitempty" validate:"omitempty,min=1"`
}

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.

type FunctionRef

type FunctionRef struct {
	// Name of the referenced function
	RefName string `json:"refName" validate:"required"`
	// Function arguments
	// TODO: validate it as required if function type is graphql
	Arguments map[string]Object `json:"arguments,omitempty"`
	// String containing a valid GraphQL selection set
	// TODO: validate it as required if function type is graphql
	SelectionSet string `json:"selectionSet,omitempty"`
	// Invoke specifies if the subflow should be invoked sync or async.
	// Defaults to sync.
	Invoke InvokeKind `json:"invoke,omitempty" validate:"required,oneof=async sync"`
}

FunctionRef defines the reference to a reusable function definition

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"
)

type GrantType added in v2.1.0

type GrantType string

GrantType ...

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

type IObject added in v2.2.0

type IObject interface {
	DeepCopyIObject() IObject
}

IObject interface that can converted into one of the three subtypes

type InjectState

type InjectState struct {
	BaseState
	// JSON object which can be set as states data input and can be manipulated via filters
	Data map[string]Object `json:"data" validate:"required,min=1"`
	// State specific timeouts
	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) DeepCopyState added in v2.2.0

func (in *InjectState) DeepCopyState() State

type InjectStateTimeout added in v2.1.0

type InjectStateTimeout struct {
	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 Integer added in v2.2.0

type Integer int

Integer int32 type

func (Integer) DeepCopyIObject added in v2.2.0

func (m Integer) DeepCopyIObject() IObject

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"
)

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 {
	BaseAuthProperties
	// Authority String or a workflow expression. Contains the authority information
	Authority string `json:"authority,omitempty" validate:"omitempty,min=1"`
	// GrantType Defines the grant type
	GrantType GrantType `json:"grantType" validate:"required"`
	// ClientID String or a workflow expression. Contains the client identifier
	ClientID string `json:"clientId" validate:"required"`
	// ClientSecret Workflow secret or a workflow expression. Contains the client secret
	ClientSecret string `json:"clientSecret,omitempty" validate:"omitempty,min=1"`
	// Scopes Array containing strings or workflow expressions. Contains the OAuth2 scopes
	Scopes []string `json:"scopes,omitempty" validate:"omitempty,min=1"`
	// Username String or a workflow expression. Contains the username. Used only if grantType is 'resourceOwner'
	Username string `json:"username,omitempty" validate:"omitempty,min=1"`
	// Password String or a workflow expression. Contains the user password. Used only if grantType is 'resourceOwner'
	Password string `json:"password,omitempty" validate:"omitempty,min=1"`
	// Audiences Array containing strings or workflow expressions. Contains the OAuth2 audiences
	Audiences []string `json:"audiences,omitempty" validate:"omitempty,min=1"`
	// SubjectToken String or a workflow expression. Contains the subject token
	SubjectToken string `json:"subjectToken,omitempty" validate:"omitempty,min=1"`
	// RequestedSubject String or a workflow expression. Contains the requested subject
	RequestedSubject string `json:"requestedSubject,omitempty" validate:"omitempty,min=1"`
	// RequestedIssuer String or a workflow expression. Contains the requested issuer
	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) DeepCopyAuthProperties added in v2.2.0

func (b *OAuth2AuthProperties) DeepCopyAuthProperties() AuthProperties

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.

func (*OAuth2AuthProperties) UnmarshalJSON added in v2.1.0

func (b *OAuth2AuthProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON ...

type Object added in v2.2.0

type Object struct {
	IObject
}

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
  • raw - holds any not typed value, replaces the interface{} behavior.

func FromInt added in v2.2.0

func FromInt(val int) Object

FromInt creates an Object with an int32 value.

func FromRaw added in v2.2.0

func FromRaw(val interface{}) Object

FromRaw creates an Object with untyped values.

func FromString added in v2.2.0

func FromString(val string) Object

FromString creates an Object with a string value.

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 ...

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"`
	// Transition to next state to handle the error. If retryRef is defined, this transition is taken only if retries were unsuccessful.
	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.
	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
	EventRefs []string `json:"eventRefs" validate:"required,min=1"`
	// Specifies how actions are to be performed (in sequence or parallel)
	// Defaults to sequential
	ActionMode ActionMode `json:"actionMode,omitempty" validate:"required,oneof=sequential parallel"`
	// Actions to be performed if expression matches
	Actions []Action `json:"actions,omitempty" validate:"omitempty,dive"`
	// Event data filter
	EventDataFilter EventDataFilter `json:"eventDataFilter,omitempty"`
}

OnEvents define which actions are be performed for the one or more 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 OperationState

type OperationState struct {
	BaseState
	// Specifies whether actions are performed in sequence or in parallel
	// Defaults to sequential
	ActionMode ActionMode `json:"actionMode,omitempty" validate:"required,oneof=sequential parallel"`
	// Actions to be performed
	Actions []Action `json:"actions" validate:"required,min=1,dive"`
	// State specific timeouts
	Timeouts *OperationStateTimeout `json:"timeouts,omitempty"`
}

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

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) DeepCopyState added in v2.2.0

func (o *OperationState) DeepCopyState() State

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 {
	StateExecTimeout  *StateExecTimeout `json:"stateExecTimeout,omitempty"`
	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 {
	BaseState
	// Branch Definitions
	Branches []Branch `json:"branches" validate:"required,min=1,dive"`
	// Option types on how to complete branch execution.
	// Defaults to `allOf`
	CompletionType CompletionType `json:"completionType,omitempty" validate:"required,oneof=allOf atLeast"`

	// Used when completionType is set to 'atLeast' to specify the minimum number of branches that must complete before the state will transition."
	// TODO: change this field to unmarshal result as int
	NumCompleted intstr.IntOrString `json:"numCompleted,omitempty"`
	// State specific timeouts
	Timeouts *ParallelStateTimeout `json:"timeouts,omitempty"`
}

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

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) DeepCopyState added in v2.2.0

func (s *ParallelState) DeepCopyState() State

func (*ParallelState) UnmarshalJSON added in v2.2.0

func (s *ParallelState) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal ParallelState object from json bytes

type ParallelStateTimeout added in v2.1.0

type ParallelStateTimeout struct {
	StateExecTimeout  *StateExecTimeout `json:"stateExecTimeout,omitempty"`
	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 {
	// References a name of a defined event
	EventRef string `json:"eventRef" validate:"required"`
	// TODO: add object or string data type
	// 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.
	// TODO
	Data string `json:"data,omitempty"`
	// Add additional event extension context attributes
	// TODO map[string]interface{}
	ContextAttributes map[string]string `json:"contextAttributes,omitempty"`
}

ProduceEvent ...

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 Retry

type Retry struct {
	// Unique retry strategy name
	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.
	Multiplier *floatstr.Float32OrString `json:"multiplier,omitempty" validate:"omitempty,min=1"`
	// Maximum number of retry attempts.
	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) 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.

type Schedule

type Schedule struct {
	// Time interval (must be repeating interval) described with ISO 8601 format. Declares when workflow instances will be automatically created.
	Interval string `json:"interval,omitempty"`
	Cron     *Cron  `json:"cron,omitempty"`
	// Timezone name used to evaluate the interval & cron-expression. (default: UTC)
	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 ...

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 ...

type Sleep added in v2.1.0

type Sleep struct {
	// Before defines amount of time (ISO 8601 duration format) to sleep before function/subflow invocation. Does not apply if 'eventRef' is defined.
	Before string `json:"before,omitempty" validate:"omitempty,iso8601duration"`
	// After defines amount of time (ISO 8601 duration format) to sleep after function/subflow invocation. Does not apply if 'eventRef' is defined.
	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.

type SleepState added in v2.1.0

type SleepState struct {
	BaseState

	// Duration (ISO 8601 duration format) to sleep
	Duration string `json:"duration" validate:"required,iso8601duration"`
	// Timeouts State specific timeouts
	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) DeepCopyState added in v2.2.0

func (in *SleepState) DeepCopyState() State

type SleepStateTimeout added in v2.1.0

type SleepStateTimeout struct {
	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 {
	StateName string    `json:"stateName" validate:"required"`
	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 ...

type State

type State interface {
	GetID() string
	GetName() string
	GetType() StateType
	GetOnErrors() []OnError
	GetTransition() *Transition
	GetStateDataFilter() *StateDataFilter
	GetCompensatedBy() string
	GetUsedForCompensation() bool
	GetEnd() *End
	GetMetadata() *Metadata
	// DeepCopyState fixes undefined (type State has no field or method DeepCopyState)
	DeepCopyState() State
}

State definition for a Workflow state

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)
	Single string `json:"single,omitempty" validate:"omitempty,iso8601duration"`
	// Total state execution timeout, including retries (ISO 8601 duration format)
	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 ...

type String added in v2.2.0

type String string

String string type

func (String) DeepCopyIObject added in v2.2.0

func (m String) DeepCopyIObject() IObject

type SwitchState added in v2.2.0

type SwitchState struct {
	// TODO: don't use BaseState for this, there are a few fields that SwitchState don't need.
	BaseState

	// Default transition of the workflow if there is no matching data conditions. Can include a transition or end definition
	// Required
	DefaultCondition DefaultCondition `json:"defaultCondition"`
	// Defines conditions evaluated against events
	EventConditions []EventCondition `json:"eventConditions" validate:"omitempty,min=1,dive"`
	// Defines conditions evaluated against data
	DataConditions []DataCondition `json:"dataConditions" validate:"omitempty,min=1,dive"`
	// SwitchState specific timeouts
	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) DeepCopyState added in v2.2.0

func (in *SwitchState) DeepCopyState() State

type SwitchStateTimeout added in v2.2.0

type SwitchStateTimeout struct {
	StateExecTimeout *StateExecTimeout `json:"stateExecTimeout,omitempty"`

	// EventTimeout specify the expire value to transitions to defaultCondition
	// when event-based conditions do not arrive.
	// NOTE: this is only available for EventConditions
	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'
	WorkflowExecTimeout *WorkflowExecTimeout `json:"workflowExecTimeout,omitempty"`
	// StateExecTimeout Total state execution timeout (including retries) (ISO 8601 duration format)
	StateExecTimeout *StateExecTimeout `json:"stateExecTimeout,omitempty"`
	// ActionExecTimeout Single actions definition execution timeout duration (ISO 8601 duration format)
	ActionExecTimeout string `json:"actionExecTimeout,omitempty" validate:"omitempty,min=1"`
	// BranchExecTimeout Single branch execution timeout duration (ISO 8601 duration format)
	BranchExecTimeout string `json:"branchExecTimeout,omitempty" validate:"omitempty,min=1"`
	// EventTimeout Timeout duration to wait for consuming defined events (ISO 8601 duration format)
	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 ...

type Transition

type Transition struct {
	// Name of state to transition to
	NextState string `json:"nextState" validate:"required,min=1"`
	// Array of events to be produced before the transition happens
	ProduceEvents []ProduceEvent `json:"produceEvents,omitempty" validate:"omitempty,dive"`
	// If set to true, triggers workflow compensation when before this transition is taken. Default is false
	Compensate bool `json:"compensate,omitempty"`
}

Transition ...

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 ...

type Workflow

type Workflow struct {
	BaseWorkflow
	States    []State    `json:"states" validate:"required,min=1,dive"`
	Events    []Event    `json:"events,omitempty"`
	Functions []Function `json:"functions,omitempty"`
	Retries   []Retry    `json:"retries,omitempty" validate:"dive"`
}

Workflow base definition

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 {
	// Duration Workflow execution timeout duration (ISO 8601 duration format). If not specified should be 'unlimited'
	Duration string `json:"duration,omitempty" validate:"omitempty,min=1"`
	// If `false`, workflow instance is allowed to finish current execution. If `true`, current workflow execution is
	// abrupted terminated.
	Interrupt bool `json:"interrupt,omitempty"`
	// Name of a workflow state to be executed before workflow instance is terminated
	RunBefore string `json:"runBefore,omitempty" validate:"omitempty,min=1"`
}

WorkflowExecTimeout ...

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 ...

type WorkflowRef added in v2.1.0

type WorkflowRef struct {
	// Sub-workflow unique id
	WorkflowID string `json:"workflowId" validate:"required"`
	// Sub-workflow version
	Version string `json:"version,omitempty"`

	// Invoke specifies if the subflow should be invoked sync or async.
	// Defaults to sync.
	Invoke InvokeKind `json:"invoke,omitempty" validate:"required,oneof=async sync"`

	// OnParantComplete specifies how subflow execution should behave when parent workflow completes if invoke is 'async'。
	// Defaults to terminate.
	OnParentComplete string `json:"onParentComplete,omitempty" validate:"required,oneof=terminate continue"`
}

WorkflowRef holds a reference for a workflow definition

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

Jump to

Keyboard shortcuts

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