stepfunction

package
v0.0.0-...-1f88bb8 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorStateNameEmpty     = errors.New("state name should not be empty")
	ErrorStateNameDuplicate = errors.New("state name should not be duplicate")
)

ErrorLackOfRequiredField ...

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

type StateMachineBody struct {
	StartAt string
	States  map[string]map[string]any
}

StateMachineBody ...

type StepFunctionDecoder

type StepFunctionDecoder struct {
	*decoder.CommonDecoder
	// contains filtered or unexported fields
}

StepFunctionDecoder decodes AWS Step Functions JSON definitions

func NewStepFunctionDecoder

func NewStepFunctionDecoder(config *config.Config) *StepFunctionDecoder

NewStepFunctionDecoder creates a new StepFunctionDecoder instance

func (*StepFunctionDecoder) Decode

func (decoder *StepFunctionDecoder) Decode(definition string) (*states.StateMachine, error)

Decode decodes a state machine definition from JSON string

func (*StepFunctionDecoder) DecodeBaseState

func (sfDecoder *StepFunctionDecoder) DecodeBaseState(ctx context.Context, data map[string]any) (states.State, error)

DecodeBaseState decodes a base state from the given data map

func (*StepFunctionDecoder) DecodeState

func (decoder *StepFunctionDecoder) DecodeState(ctx context.Context, data map[string]any) (states.State, error)

DecodeState decodes a state from the given data map

func (*StepFunctionDecoder) DecodeStateDefinition

func (sfDecoder *StepFunctionDecoder) DecodeStateDefinition(ctx context.Context, definition string) (states.State, error)

DecodeStateDefinition decodes a state definition from JSON string

func (*StepFunctionDecoder) DecodeStateMachine

func (decoder *StepFunctionDecoder) DecodeStateMachine(ctx context.Context, data map[string]any) (*states.StateMachine, error)

DecodeStateMachine ...

func (*StepFunctionDecoder) DecodeStateMachineHeader

func (sfdecoder *StepFunctionDecoder) DecodeStateMachineHeader(ctx context.Context, data map[string]interface{}) (
	*states.StateMachineHeader, error)

DecodeStateMachineHeader ...

func (*StepFunctionDecoder) DecodeStateMachineHeaderDefinition

func (sfdecoder *StepFunctionDecoder) DecodeStateMachineHeaderDefinition(definition string) (*states.StateMachineHeader, error)

DecodeStateMachineHeaderDefintion ...

func (*StepFunctionDecoder) DecodeTaskBody

func (decoder *StepFunctionDecoder) DecodeTaskBody(ctx context.Context, data map[string]any) (
	*states.TaskBody, error)

DecodeTaskBody ...

func (*StepFunctionDecoder) DecodeTaskState

func (decoder *StepFunctionDecoder) DecodeTaskState(ctx context.Context, basestate *states.BaseState, data map[string]any) (
	states.State, error)

DecodeTaskState ...

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

Jump to

Keyboard shortcuts

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