commonsteps

package
v2.8.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: BSD-3-Clause Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func If

func If(condition types.Condition, thenStep types.Step, elseStep types.Step) types.Step

If is a `types.Step` which returns Actions of `thenStep` if `condition` is satisfied, or Actions of `elseStep` otherwise.

func SetActor

func SetActor(actor types.Actor) types.Step

SetActor just sets the Actor.

func SetActorFromFunc

func SetActorFromFunc(actorFunc func(state *types.State) types.Actor) types.Step

SetActorFromFunc sets the Actor depending on the State.

func SetFlow

func SetFlow(flow types.Flow) types.Step

SetFlow returns a types.Step, which just sets the Flow.

func SetFlowFromFunc

func SetFlowFromFunc(flowFunc func(state *types.State) types.Flow) types.Step

SetFlow sets the Flow depending on the State.

Types

type MergeSteps

type MergeSteps types.Steps

MergeSteps merges actions of multiple steps into one Step.

func (MergeSteps) Actions

func (s MergeSteps) Actions(ctx context.Context, state *types.State) types.Actions

Actions implements types.Step.

type Panic

type Panic string

func (Panic) Actions

func (p Panic) Actions(_ context.Context, s *types.State) types.Actions

func (Panic) String

func (p Panic) String() string

type SetFlowStruct

type SetFlowStruct struct {
	NextFlow types.Flow
}

SetFlowStruct is the value returned by SetFlow.

func (*SetFlowStruct) Actions

func (step *SetFlowStruct) Actions(_ context.Context, state *types.State) types.Actions

Action implements types.Step.

func (*SetFlowStruct) String

func (step *SetFlowStruct) String() string

String implements fmt.Stringer.

Jump to

Keyboard shortcuts

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