model

package
Version: v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const WorkflowIDRegex = "^[a-z][a-z0-9._-]{1,34}[a-z0-9]$"

WorkflowIDRegex - Regex used to validate ID

Variables

View Source
var FunctionTypeStrings = []string{"unknown", "reusable", "isolated", "knative-namespace", "knative-global", "subflow"}

Functions

This section is empty.

Types

type ActionDefinition

type ActionDefinition struct {
	Function string           `yaml:"function,omitempty"`
	Input    interface{}      `yaml:"input,omitempty"`
	Secrets  []string         `yaml:"secrets,omitempty"`
	Retries  *RetryDefinition `yaml:"retries,omitempty"`
}

func (*ActionDefinition) Validate

func (o *ActionDefinition) Validate() error

type ActionState

type ActionState struct {
	StateCommon `yaml:",inline"`
	Action      *ActionDefinition `yaml:"action"`
	Async       bool              `yaml:"async,omitempty"`
	Timeout     string            `yaml:"timeout,omitempty"`
	Transform   interface{}       `yaml:"transform,omitempty"`
	Transition  string            `yaml:"transition,omitempty"`
}

func (*ActionState) GetID

func (o *ActionState) GetID() string

func (*ActionState) GetTransitions

func (o *ActionState) GetTransitions() []string

func (*ActionState) Validate

func (o *ActionState) Validate() error

type BranchMode

type BranchMode int
const (
	BranchModeAnd BranchMode = iota
	BranchModeOr
)

func ParseBranchMode

func ParseBranchMode(s string) (BranchMode, error)

func (BranchMode) MarshalJSON

func (a BranchMode) MarshalJSON() ([]byte, error)

func (BranchMode) MarshalYAML

func (a BranchMode) MarshalYAML() (interface{}, error)

func (BranchMode) String

func (a BranchMode) String() string

func (*BranchMode) UnmarshalJSON

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

func (*BranchMode) UnmarshalYAML

func (a *BranchMode) UnmarshalYAML(unmarshal func(interface{}) error) error

type CallbackState

type CallbackState struct {
	StateCommon `yaml:",inline"`
	Action      *ActionDefinition       `yaml:"action"`
	Event       *ConsumeEventDefinition `yaml:"event"`
	Timeout     string                  `yaml:"timeout,omitempty"`
	Transform   interface{}             `yaml:"transform,omitempty"`
	Transition  string                  `yaml:"transition,omitempty"`
}

func (*CallbackState) GetID

func (o *CallbackState) GetID() string

func (*CallbackState) GetTransitions

func (o *CallbackState) GetTransitions() []string

func (*CallbackState) Validate

func (o *CallbackState) Validate() error

type ConsumeEventDefinition

type ConsumeEventDefinition struct {
	Type    string                 `yaml:"type"`
	Context map[string]interface{} `yaml:"context,omitempty"`
}

func (*ConsumeEventDefinition) Validate

func (o *ConsumeEventDefinition) Validate() error

type ConsumeEventState

type ConsumeEventState struct {
	StateCommon `yaml:",inline"`
	Event       *ConsumeEventDefinition `yaml:"event"`
	Timeout     string                  `yaml:"timeout,omitempty"`
	Transform   interface{}             `yaml:"transform,omitempty"`
	Transition  string                  `yaml:"transition,omitempty"`
}

func (*ConsumeEventState) GetID

func (o *ConsumeEventState) GetID() string

func (*ConsumeEventState) GetTransitions

func (o *ConsumeEventState) GetTransitions() []string

func (*ConsumeEventState) Validate

func (o *ConsumeEventState) Validate() error

type DefaultStart

type DefaultStart struct {
	StartCommon `yaml:",inline"`
}

func (*DefaultStart) GetEvents

func (o *DefaultStart) GetEvents() []StartEventDefinition

func (*DefaultStart) Validate

func (o *DefaultStart) Validate() error

type DelayState

type DelayState struct {
	StateCommon `yaml:",inline"`
	Duration    string      `yaml:"duration"`
	Transform   interface{} `yaml:"transform,omitempty"`
	Transition  string      `yaml:"transition,omitempty"`
}

func (*DelayState) GetID

func (o *DelayState) GetID() string

func (*DelayState) GetTransitions

func (o *DelayState) GetTransitions() []string

func (*DelayState) Validate

func (o *DelayState) Validate() error

type ErrorDefinition

type ErrorDefinition struct {
	Error      string `yaml:"error"`
	Transition string `yaml:"transition,omitempty"`
}

func (*ErrorDefinition) Validate

func (o *ErrorDefinition) Validate() error

type ErrorState

type ErrorState struct {
	StateCommon `yaml:",inline"`
	Error       string      `yaml:"error"`
	Message     string      `yaml:"message"`
	Args        []string    `yaml:"args,omitempty"`
	Transform   interface{} `yaml:"transform,omitempty"`
	Transition  string      `yaml:"transition,omitempty"`
}

func (*ErrorState) GetArgs

func (o *ErrorState) GetArgs() []string

func (*ErrorState) GetID

func (o *ErrorState) GetID() string

func (*ErrorState) GetTransitions

func (o *ErrorState) GetTransitions() []string

func (*ErrorState) Validate

func (o *ErrorState) Validate() error

type EventConditionDefinition

type EventConditionDefinition struct {
	Event      ConsumeEventDefinition `yaml:"event"`
	Transform  interface{}            `yaml:"transform,omitempty"`
	Transition string                 `yaml:"transition,omitempty"`
}

type EventStart

type EventStart struct {
	StartCommon `yaml:",inline"`
	Event       *StartEventDefinition `yaml:"event"`
}

func (*EventStart) GetEvents

func (o *EventStart) GetEvents() []StartEventDefinition

func (*EventStart) Validate

func (o *EventStart) Validate() error

type EventsAndStart

type EventsAndStart struct {
	StartCommon `yaml:",inline"`
	LifeSpan    string                 `yaml:"lifespan,omitempty"`
	Correlate   []string               `yaml:"correlate,omitempty"`
	Events      []StartEventDefinition `yaml:"events"`
}

func (*EventsAndStart) GetEvents

func (o *EventsAndStart) GetEvents() []StartEventDefinition

func (*EventsAndStart) Validate

func (o *EventsAndStart) Validate() error

type EventsAndState

type EventsAndState struct {
	StateCommon `yaml:",inline"`
	Events      []ConsumeEventDefinition `yaml:"events"`
	Timeout     string                   `yaml:"timeout,omitempty"`
	Transform   interface{}              `yaml:"transform,omitempty"`
	Transition  string                   `yaml:"transition,omitempty"`
}

func (*EventsAndState) GetEvents

func (o *EventsAndState) GetEvents() []ConsumeEventDefinition

func (*EventsAndState) GetID

func (o *EventsAndState) GetID() string

func (*EventsAndState) GetTransitions

func (o *EventsAndState) GetTransitions() []string

func (*EventsAndState) Validate

func (o *EventsAndState) Validate() error

type EventsXorStart

type EventsXorStart struct {
	StartCommon `yaml:",inline"`
	Events      []StartEventDefinition `yaml:"events"`
}

func (*EventsXorStart) GetEvents

func (o *EventsXorStart) GetEvents() []StartEventDefinition

func (*EventsXorStart) Validate

func (o *EventsXorStart) Validate() error

type EventsXorState

type EventsXorState struct {
	StateCommon `yaml:",inline"`
	Events      []EventConditionDefinition `yaml:"events"`
	Timeout     string                     `yaml:"timeout,omitempty"`
}

func (*EventsXorState) GetEvents

func (o *EventsXorState) GetEvents() []EventConditionDefinition

func (*EventsXorState) GetID

func (o *EventsXorState) GetID() string

func (*EventsXorState) GetTransitions

func (o *EventsXorState) GetTransitions() []string

func (*EventsXorState) Validate

func (o *EventsXorState) Validate() error

type ForEachState

type ForEachState struct {
	StateCommon `yaml:",inline"`
	Array       interface{}       `yaml:"array"`
	Action      *ActionDefinition `yaml:"action"`
	Timeout     string            `yaml:"timeout,omitempty"`
	Transform   interface{}       `yaml:"transform,omitempty"`
	Transition  string            `yaml:"transition,omitempty"`
}

func (*ForEachState) GetID

func (o *ForEachState) GetID() string

func (*ForEachState) GetTransitions

func (o *ForEachState) GetTransitions() []string

func (*ForEachState) Validate

func (o *ForEachState) Validate() error

type FunctionDefinition

type FunctionDefinition interface {
	GetID() string
	GetType() FunctionType
	Validate() error
}

type FunctionFileDefinition added in v0.2.4

type FunctionFileDefinition struct {
	Key   string `yaml:"key" json:"key"`
	As    string `yaml:"as,omitempty" json:"as,omitempty"`
	Scope string `yaml:"scope,omitempty" json:"scope,omitempty"`
	Type  string `yaml:"type,omitempty" json:"type,omitempty"`
}

func (FunctionFileDefinition) Validate added in v0.2.4

func (o FunctionFileDefinition) Validate() error

type FunctionType added in v0.3.4

type FunctionType int
const (
	DefaultFunctionType           FunctionType = iota
	ReusableContainerFunctionType              // Old school knative
	IsolatedContainerFunctionType              // isolated (scale field not needed)
	NamespacedKnativeFunctionType
	GlobalKnativeFunctionType
	SubflowFunctionType
)

func ParseFunctionType added in v0.3.4

func ParseFunctionType(s string) (FunctionType, error)

func (FunctionType) MarshalJSON added in v0.3.4

func (a FunctionType) MarshalJSON() ([]byte, error)

func (FunctionType) MarshalYAML added in v0.3.4

func (a FunctionType) MarshalYAML() (interface{}, error)

func (FunctionType) String added in v0.3.4

func (a FunctionType) String() string

func (*FunctionType) UnmarshalJSON added in v0.3.4

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

func (*FunctionType) UnmarshalYAML added in v0.3.4

func (a *FunctionType) UnmarshalYAML(unmarshal func(interface{}) error) error

type GenerateEventDefinition

type GenerateEventDefinition struct {
	Type            string                 `yaml:"type"`
	Source          string                 `yaml:"source"`
	Data            interface{}            `yaml:"data,omitempty"`
	DataContentType string                 `yaml:"data_content_type,omitempty"`
	Context         map[string]interface{} `yaml:"context,omitempty"`
}

func (*GenerateEventDefinition) Validate

func (o *GenerateEventDefinition) Validate() error

type GenerateEventState

type GenerateEventState struct {
	StateCommon `yaml:",inline"`
	Delay       string                   `yaml:"delay"`
	Event       *GenerateEventDefinition `yaml:"event"`
	Transform   interface{}              `yaml:"transform,omitempty"`
	Transition  string                   `yaml:"transition,omitempty"`
}

func (*GenerateEventState) GetDelay added in v0.4.1

func (o *GenerateEventState) GetDelay() string

func (*GenerateEventState) GetID

func (o *GenerateEventState) GetID() string

func (*GenerateEventState) GetTransitions

func (o *GenerateEventState) GetTransitions() []string

func (*GenerateEventState) Validate

func (o *GenerateEventState) Validate() error

type GetterDefinition added in v0.2.3

type GetterDefinition struct {
	Scope string `yaml:"scope,omitempty"`
	Key   string `yaml:"key"`
}

func (*GetterDefinition) Validate added in v0.2.3

func (o *GetterDefinition) Validate() error

type GetterState added in v0.2.3

type GetterState struct {
	StateCommon `yaml:",inline"`
	Variables   []GetterDefinition `yaml:"variables"`
	Transform   interface{}        `yaml:"transform,omitempty"`
	Transition  string             `yaml:"transition,omitempty"`
}

func (*GetterState) GetID added in v0.2.3

func (o *GetterState) GetID() string

func (*GetterState) GetTransitions added in v0.2.3

func (o *GetterState) GetTransitions() []string

func (*GetterState) Validate added in v0.2.3

func (o *GetterState) Validate() error

type GlobalFunctionDefinition added in v0.4.0

type GlobalFunctionDefinition struct {
	Type           FunctionType             `yaml:"type" json:"type"`
	ID             string                   `yaml:"id" json:"id"`
	KnativeService string                   `yaml:"service" json:"service"`
	Files          []FunctionFileDefinition `yaml:"files,omitempty" json:"files,omitempty"`
}

func (*GlobalFunctionDefinition) GetID added in v0.4.0

func (o *GlobalFunctionDefinition) GetID() string

func (*GlobalFunctionDefinition) GetType added in v0.4.0

func (*GlobalFunctionDefinition) Validate added in v0.4.0

func (o *GlobalFunctionDefinition) Validate() error

type IsolatedFunctionDefinition added in v0.4.0

type IsolatedFunctionDefinition struct {
	Type  FunctionType             `yaml:"type" json:"type"`
	ID    string                   `yaml:"id" json:"id"`
	Image string                   `yaml:"image" json:"image"`
	Size  Size                     `yaml:"size,omitempty" json:"size,omitempty"`
	Cmd   string                   `yaml:"cmd,omitempty" json:"cmd,omitempty"`
	Files []FunctionFileDefinition `yaml:"files,omitempty" json:"files,omitempty"`
}

func (*IsolatedFunctionDefinition) GetID added in v0.4.0

func (*IsolatedFunctionDefinition) GetType added in v0.4.0

func (*IsolatedFunctionDefinition) Validate added in v0.4.0

func (o *IsolatedFunctionDefinition) Validate() error

type NamespacedFunctionDefinition added in v0.4.0

type NamespacedFunctionDefinition struct {
	Type           FunctionType             `yaml:"type" json:"type"`
	ID             string                   `yaml:"id" json:"id"`
	KnativeService string                   `yaml:"service" json:"service"`
	Files          []FunctionFileDefinition `yaml:"files,omitempty" json:"files,omitempty"`
}

func (*NamespacedFunctionDefinition) GetID added in v0.4.0

func (*NamespacedFunctionDefinition) GetType added in v0.4.0

func (*NamespacedFunctionDefinition) Validate added in v0.4.0

func (o *NamespacedFunctionDefinition) Validate() error

type NoopState

type NoopState struct {
	StateCommon `yaml:",inline"`
	Transform   interface{} `yaml:"transform,omitempty"`
	Transition  string      `yaml:"transition,omitempty"`
}

func (*NoopState) GetID

func (o *NoopState) GetID() string

func (*NoopState) GetTransitions

func (o *NoopState) GetTransitions() []string

func (*NoopState) Validate

func (o *NoopState) Validate() error

type ParallelState

type ParallelState struct {
	StateCommon `yaml:",inline"`
	Actions     []ActionDefinition `yaml:"actions"`
	Mode        BranchMode         `yaml:"mode,omitempty"`
	Timeout     string             `yaml:"timeout,omitempty"`
	Transform   interface{}        `yaml:"transform,omitempty"`
	Transition  string             `yaml:"transition,omitempty"`
}

func (*ParallelState) GetActions

func (o *ParallelState) GetActions() []ActionDefinition

func (*ParallelState) GetID

func (o *ParallelState) GetID() string

func (*ParallelState) GetTransitions

func (o *ParallelState) GetTransitions() []string

func (*ParallelState) Validate

func (o *ParallelState) Validate() error

type ProduceEventDefinition

type ProduceEventDefinition struct {
	Type    string                 `yaml:"type,omitempty"`
	Source  string                 `yaml:"source,omitempty"`
	Data    string                 `yaml:"data,omitempty"`
	Context map[string]interface{} `yaml:"context,omitempty"`
}

func (*ProduceEventDefinition) Validate

func (o *ProduceEventDefinition) Validate() error

type RetryDefinition

type RetryDefinition struct {
	MaxAttempts int      `yaml:"max_attempts" json:"max_attempts"`
	Delay       string   `yaml:"delay,omitempty" json:"delay"`
	Multiplier  float64  `yaml:"multiplier,omitempty" json:"multiplier"`
	Codes       []string `yaml:"codes" json:"codes"`
}

func (*RetryDefinition) Validate

func (o *RetryDefinition) Validate() error

type ReusableFunctionDefinition added in v0.4.0

type ReusableFunctionDefinition struct {
	Type  FunctionType             `yaml:"type" json:"type"`
	ID    string                   `yaml:"id" json:"id"`
	Image string                   `yaml:"image" json:"image"`
	Size  Size                     `yaml:"size,omitempty" json:"size,omitempty"`
	Cmd   string                   `yaml:"cmd,omitempty" json:"cmd,omitempty"`
	Scale int                      `yaml:"scale,omitempty" json:"scale,omitempty"`
	Files []FunctionFileDefinition `yaml:"files,omitempty" json:"files,omitempty"`
}

func (*ReusableFunctionDefinition) GetID added in v0.4.0

func (*ReusableFunctionDefinition) GetType added in v0.4.0

func (*ReusableFunctionDefinition) Validate added in v0.4.0

func (o *ReusableFunctionDefinition) Validate() error

type ScheduledStart

type ScheduledStart struct {
	StartCommon `yaml:",inline"`
	Cron        string `yaml:"cron"`
}

func (*ScheduledStart) GetEvents

func (o *ScheduledStart) GetEvents() []StartEventDefinition

func (*ScheduledStart) Validate

func (o *ScheduledStart) Validate() error

type SchemaDefinition

type SchemaDefinition struct {
	ID     string      `yaml:"id"`
	Schema interface{} `yaml:"schema"`
}

func (*SchemaDefinition) Validate

func (o *SchemaDefinition) Validate() error

type SetterDefinition added in v0.2.3

type SetterDefinition struct {
	Scope string      `yaml:"scope,omitempty"`
	Key   string      `yaml:"key"`
	Value interface{} `yaml:"value,omitempty"`
}

func (*SetterDefinition) Validate added in v0.2.3

func (o *SetterDefinition) Validate() error

type SetterState added in v0.2.3

type SetterState struct {
	StateCommon `yaml:",inline"`
	Variables   []SetterDefinition `yaml:"variables"`
	Transform   interface{}        `yaml:"transform,omitempty"`
	Transition  string             `yaml:"transition,omitempty"`
}

func (*SetterState) GetID added in v0.2.3

func (o *SetterState) GetID() string

func (*SetterState) GetTransitions added in v0.2.3

func (o *SetterState) GetTransitions() []string

func (*SetterState) Validate added in v0.2.3

func (o *SetterState) Validate() error

type Size

type Size int

Size string enum to differentiate function sizes

const (
	SmallSize Size = iota
	MediumSize
	LargeSize
)

func ParseSize

func ParseSize(s string) (Size, error)

func (Size) MarshalJSON

func (a Size) MarshalJSON() ([]byte, error)

func (Size) MarshalYAML

func (a Size) MarshalYAML() (interface{}, error)

func (Size) String

func (a Size) String() string

func (*Size) UnmarshalJSON

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

func (*Size) UnmarshalYAML

func (a *Size) UnmarshalYAML(unmarshal func(interface{}) error) error

type StartCommon

type StartCommon struct {
	Type  StartType `yaml:"type"`
	State string    `yaml:"state,omitempty"`
}

func (*StartCommon) GetState

func (o *StartCommon) GetState() string

func (*StartCommon) GetType

func (o *StartCommon) GetType() StartType

type StartDefinition

type StartDefinition interface {
	GetState() string
	GetType() StartType
	Validate() error
	GetEvents() []StartEventDefinition
}

type StartEventDefinition

type StartEventDefinition struct {
	Type    string                 `yaml:"type"`
	Filters map[string]interface{} `yaml:"filters,omitempty"`
}

FIXME: Going to be renamed later

func (*StartEventDefinition) Validate

func (o *StartEventDefinition) Validate() error

type StartType

type StartType int
const (
	StartTypeDefault StartType = iota
	StartTypeScheduled
	StartTypeEvent
	StartTypeEventsXor
	StartTypeEventsAnd
)

func ParseStartType

func ParseStartType(s string) (StartType, error)

func (StartType) MarshalJSON

func (a StartType) MarshalJSON() ([]byte, error)

func (StartType) MarshalYAML

func (a StartType) MarshalYAML() (interface{}, error)

func (StartType) String

func (a StartType) String() string

func (*StartType) UnmarshalJSON

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

func (*StartType) UnmarshalYAML

func (a *StartType) UnmarshalYAML(unmarshal func(interface{}) error) error

type State

type State interface {
	GetID() string
	GetType() StateType
	Validate() error
	ErrorDefinitions() []ErrorDefinition
	GetTransitions() []string
	// contains filtered or unexported methods
}

type StateCommon

type StateCommon struct {
	ID    string            `yaml:"id"`
	Type  StateType         `yaml:"type"`
	Log   interface{}       `yaml:"log,omitempty"`
	Catch []ErrorDefinition `yaml:"catch,omitempty"`
}

func (*StateCommon) ErrorDefinitions added in v0.2.3

func (o *StateCommon) ErrorDefinitions() []ErrorDefinition

func (*StateCommon) GetType

func (o *StateCommon) GetType() StateType

type StateType

type StateType int
const (
	StateTypeAction StateType = iota
	StateTypeConsumeEvent
	StateTypeDelay
	StateTypeEventsAnd
	StateTypeEventsXor
	StateTypeError
	StateTypeForEach
	StateTypeGenerateEvent
	StateTypeNoop
	StateTypeParallel
	StateTypeSwitch
	StateTypeValidate
	StateTypeConsume
	StateTypeCallback
	StateTypeGetter
	StateTypeSetter
)

func ParseStateType

func ParseStateType(s string) (StateType, error)

func (StateType) MarshalJSON

func (a StateType) MarshalJSON() ([]byte, error)

func (StateType) MarshalYAML

func (a StateType) MarshalYAML() (interface{}, error)

func (StateType) String

func (a StateType) String() string

func (*StateType) UnmarshalJSON

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

func (*StateType) UnmarshalYAML

func (a *StateType) UnmarshalYAML(unmarshal func(interface{}) error) error

type SubflowFunctionDefinition added in v0.4.0

type SubflowFunctionDefinition struct {
	Type     FunctionType `yaml:"type" json:"type"`
	ID       string       `yaml:"id" json:"id"`
	Workflow string       `yaml:"workflow" json:"workflow"`
}

func (*SubflowFunctionDefinition) GetID added in v0.4.0

func (o *SubflowFunctionDefinition) GetID() string

func (*SubflowFunctionDefinition) GetType added in v0.4.0

func (*SubflowFunctionDefinition) Validate added in v0.4.0

func (o *SubflowFunctionDefinition) Validate() error

type SwitchConditionDefinition

type SwitchConditionDefinition struct {
	Condition  interface{} `yaml:"condition"`
	Transform  interface{} `yaml:"transform,omitempty"`
	Transition string      `yaml:"transition,omitempty"`
}

func (*SwitchConditionDefinition) Validate

func (o *SwitchConditionDefinition) Validate() error

type SwitchState

type SwitchState struct {
	StateCommon       `yaml:",inline"`
	Conditions        []SwitchConditionDefinition `yaml:"conditions"`
	DefaultTransform  interface{}                 `yaml:"defaultTransform,omitempty"`
	DefaultTransition string                      `yaml:"defaultTransition,omitempty"`
}

func (*SwitchState) GetConditions

func (o *SwitchState) GetConditions() []SwitchConditionDefinition

func (*SwitchState) GetID

func (o *SwitchState) GetID() string

func (*SwitchState) GetTransitions

func (o *SwitchState) GetTransitions() []string

func (*SwitchState) Validate

func (o *SwitchState) Validate() error

type TimeoutDefinition

type TimeoutDefinition struct {
	Interrupt string `yaml:"interrupt,omitempty"`
	Kill      string `yaml:"kill,omitempty"`
}

func (*TimeoutDefinition) Validate

func (o *TimeoutDefinition) Validate() error

type ValidateState

type ValidateState struct {
	StateCommon `yaml:",inline"`
	Subject     string      `yaml:"subject,omitempty"`
	Schema      interface{} `yaml:"schema"`
	Transform   interface{} `yaml:"transform,omitempty"`
	Transition  string      `yaml:"transition,omitempty"`
}

func (*ValidateState) GetID

func (o *ValidateState) GetID() string

func (*ValidateState) GetTransitions

func (o *ValidateState) GetTransitions() []string

func (*ValidateState) Validate

func (o *ValidateState) Validate() error

type VariableReference added in v0.3.3

type VariableReference struct {
	Scope     string   `json:"scope"`
	Key       string   `json:"key"`
	Operation []string `json:"operation"`
}

VariableReference - Workflow variable referenced in getter or setter

type Workflow

type Workflow struct {
	ID          string               `yaml:"id" json:"id"`
	Name        string               `yaml:"name,omitempty" json:"name,omitempty"`
	Description string               `yaml:"description,omitempty" json:"description,omitempty"`
	Version     string               `yaml:"version,omitempty" json:"version,omitempty"`
	Exclusive   bool                 `yaml:"singular,omitempty" json:"singular,omitempty"`
	Functions   []FunctionDefinition `yaml:"functions,omitempty" json:"functions,omitempty"`
	Schemas     []SchemaDefinition   `yaml:"schemas,omitempty" json:"schemas,omitempty"`
	States      []State              `yaml:"states,omitempty" json:"states,omitempty"`
	Timeouts    *TimeoutDefinition   `yaml:"timeouts,omitempty" json:"timeouts,omitempty"`
	Start       StartDefinition      `yaml:"start,omitempty" json:"start,omitempty"`
}

func (*Workflow) GetFunction

func (o *Workflow) GetFunction(id string) (FunctionDefinition, error)

func (*Workflow) GetFunctions

func (o *Workflow) GetFunctions() []FunctionDefinition

func (*Workflow) GetSchemas

func (o *Workflow) GetSchemas() []SchemaDefinition

func (*Workflow) GetSecretReferences added in v0.3.3

func (o *Workflow) GetSecretReferences() []string

GetSecretReferences - Get all secrets referenced in actions

func (*Workflow) GetStartDefinition

func (o *Workflow) GetStartDefinition() StartDefinition

func (*Workflow) GetStartState

func (o *Workflow) GetStartState() State

func (*Workflow) GetStates

func (o *Workflow) GetStates() []State

func (*Workflow) GetStatesMap

func (o *Workflow) GetStatesMap() map[string]State

GetStatesMap : Get workflow states as a map

func (*Workflow) GetVariableReferences added in v0.3.3

func (o *Workflow) GetVariableReferences() []VariableReference

GetVariableReferences - Get all varaible referenced in getters & setters from a workflow

func (*Workflow) Load

func (o *Workflow) Load(data []byte) error

func (*Workflow) UnmarshalYAML

func (o *Workflow) UnmarshalYAML(unmarshal func(interface{}) error) error

Jump to

Keyboard shortcuts

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