Documentation
¶
Index ¶
- Variables
- type ChoiceBody
- type StateMachineBody
- type StepfuncionDecoder
- func (decoder *StepfuncionDecoder) Decode(definition string) (*states.StateMachine, error)
- func (sfDecoder *StepfuncionDecoder) DecodeBaseState(ctx context.Context, data map[string]any) (states.State, error)
- func (decoder *StepfuncionDecoder) DecodeChoiceBody(ctx context.Context, data map[string]any) (*states.ChoiceBody, error)
- func (decoder *StepfuncionDecoder) DecodeChoiceState(ctx context.Context, basestate *states.BaseState, data map[string]any) (states.State, error)
- func (sfDecoder *StepfuncionDecoder) DecodePassState(ctx context.Context, basestate *states.BaseState, data map[string]any) (states.State, error)
- func (decoder *StepfuncionDecoder) DecodeState(ctx context.Context, data map[string]any) (states.State, error)
- func (sfDecoder *StepfuncionDecoder) DecodeStateDefintion(definition string) (states.State, error)
- func (decoder *StepfuncionDecoder) DecodeStateMachine(ctx context.Context, data map[string]any) (*states.StateMachine, error)
- func (decoder *StepfuncionDecoder) DecodeStateMachineBody(ctx context.Context, data map[string]any) (*states.StateMachineBody, error)
- func (sfdecoder *StepfuncionDecoder) DecodeStateMachineHeader(ctx context.Context, data map[string]interface{}) (*states.StateMachineHeader, error)
- func (sfdecoder *StepfuncionDecoder) DecodeStateMachineHeaderDefintion(definition string) (*states.StateMachineHeader, error)
- func (decoder *StepfuncionDecoder) DecodeTaskBody(ctx context.Context, data map[string]any) (*states.TaskBody, error)
- func (decoder *StepfuncionDecoder) DecodeTaskState(ctx context.Context, basestate *states.BaseState, data map[string]any) (states.State, error)
- func (sfDecoder *StepfuncionDecoder) DecodeWaitState(ctx context.Context, basestate *states.BaseState, data map[string]any) (states.State, error)
- type TaskBody
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultBaseState = states.BaseState{
MaxExecuteTimes: 1000,
InputPath: "$",
OutputPath: "$",
ResultPath: "$",
}
DefaultBaseState default state fields config default value from https://states-language.net/spec.html#Default
View Source
var DefaultTaskBody = TaskBody{
Resource: "",
TimeoutSeconds: 0,
HeartbeatSeconds: 0,
}
DefaultTaskBody ...
View Source
var (
ErrorStateNameEmpty = errors.New("state name should not be empty")
)
ErrorLackOfRequiredField ...
View Source
var StateMachineFields = struct { Comment string Version string Type string States string }{ Comment: "Comment", Version: "Version", Type: "Type", States: "States", }
StateMachineFields ...
Functions ¶
This section is empty.
Types ¶
type ChoiceBody ¶
type StateMachineBody ¶
StateMachineBody ...
type StepfuncionDecoder ¶
type StepfuncionDecoder struct { *decoder.CommonDecoder // contains filtered or unexported fields }
StepfuncionDecoder ...
func NewStepfuncionDecoder ¶
func NewStepfuncionDecoder(config *decoder.ParserConfig, quota *decoder.Quota) *StepfuncionDecoder
NewStepfuncionDecoder ...
func (*StepfuncionDecoder) Decode ¶
func (decoder *StepfuncionDecoder) Decode(definition string) (*states.StateMachine, error)
Decode ...
func (*StepfuncionDecoder) DecodeBaseState ¶
func (sfDecoder *StepfuncionDecoder) DecodeBaseState(ctx context.Context, data map[string]any) (states.State, error)
DecodeBaseState ...
func (*StepfuncionDecoder) DecodeChoiceBody ¶
func (decoder *StepfuncionDecoder) DecodeChoiceBody(ctx context.Context, data map[string]any) ( *states.ChoiceBody, error)
DecodeTaskBody ...
func (*StepfuncionDecoder) DecodeChoiceState ¶
func (decoder *StepfuncionDecoder) DecodeChoiceState(ctx context.Context, basestate *states.BaseState, data map[string]any) ( states.State, error)
DecodeTaskState ...
func (*StepfuncionDecoder) DecodePassState ¶
func (sfDecoder *StepfuncionDecoder) DecodePassState(ctx context.Context, basestate *states.BaseState, data map[string]any) ( states.State, error)
DecodePassState ...
func (*StepfuncionDecoder) DecodeState ¶
func (decoder *StepfuncionDecoder) DecodeState(ctx context.Context, data map[string]any) (states.State, error)
DecodeState ...
func (*StepfuncionDecoder) DecodeStateDefintion ¶
func (sfDecoder *StepfuncionDecoder) DecodeStateDefintion(definition string) (states.State, error)
DecodeStateDefintion ...
func (*StepfuncionDecoder) DecodeStateMachine ¶
func (decoder *StepfuncionDecoder) DecodeStateMachine(ctx context.Context, data map[string]any) (*states.StateMachine, error)
DecodeStateMachine ...
func (*StepfuncionDecoder) DecodeStateMachineBody ¶
func (decoder *StepfuncionDecoder) DecodeStateMachineBody(ctx context.Context, data map[string]any) ( *states.StateMachineBody, error)
DecodeStateMachineBody ...
func (*StepfuncionDecoder) DecodeStateMachineHeader ¶
func (sfdecoder *StepfuncionDecoder) DecodeStateMachineHeader(ctx context.Context, data map[string]interface{}) ( *states.StateMachineHeader, error)
DecodeStateMachineHeader ...
func (*StepfuncionDecoder) DecodeStateMachineHeaderDefintion ¶
func (sfdecoder *StepfuncionDecoder) DecodeStateMachineHeaderDefintion(definition string) (*states.StateMachineHeader, error)
DecodeStateMachineHeaderDefintion ...
func (*StepfuncionDecoder) DecodeTaskBody ¶
func (decoder *StepfuncionDecoder) DecodeTaskBody(ctx context.Context, data map[string]any) ( *states.TaskBody, error)
DecodeTaskBody ...
type TaskBody ¶
type TaskBody struct { Resource string `mapstructure:"Resource"` TimeoutSeconds uint `mapstructure:"TimeoutSeconds"` HeartbeatSeconds uint `mapstructure:"HeartbeatSeconds"` Retry []map[string]any `mapstructure:"Retry"` Catch []map[string]any `mapstructure:"Catch"` }
TaskBody task body for stepfunction
Click to show internal directories.
Click to hide internal directories.