Documentation
¶
Overview ¶
Package stepflow executes transport-agnostic ordered step sequences. A dialect resolves its authorized leaves into Steps and supplies a Runner; stepflow preserves their order and threads explicit `as` bindings between them. It deliberately does not attach deployment policy to a sequence.
Index ¶
- Variables
- func CoerceScalar(s string) any
- func CondScope(jmesVars, bindings map[string]any) map[string]any
- func PlanCalls(ctx context.Context, steps []Step, resolve Resolve, sliceOf SliceOf, r Runner) ([]any, error)
- func ResolveArg(value string, inputs map[string]string, bindings map[string]any) (string, error)
- func ResolveArgDry(value string, inputs map[string]string) string
- func Run(ctx context.Context, c *cli.Command, steps []Step, strVars map[string]string, ...) (bindings map[string]any, lastRaw []byte, err error)
- func ScalarToString(v any) string
- func UnsetInputRef(value string, inputs map[string]string) bool
- type Leaf
- type Resolve
- type Runner
- type SliceOf
- type Step
Constants ¶
This section is empty.
Variables ¶
var ErrUnsetOptional = errors.New("optional input was not supplied")
ErrUnsetOptional reports a `$name` naming an input the caller omitted. Build validation rejects an undeclared ref, so a caller may drop the arg. #326.
Functions ¶
func CoerceScalar ¶
CoerceScalar lowers numeric inputs to the JSON number shape used by JMESPath.
func CondScope ¶
CondScope merges coerced inputs with completed step bindings. A binding wins over an equally named input.
func PlanCalls ¶
func PlanCalls(ctx context.Context, steps []Step, resolve Resolve, sliceOf SliceOf, r Runner) ([]any, error)
PlanCalls renders each step for a dry run. Data-flow references are resolved by the supplied resolver, which normally preserves future bindings as hints.
func ResolveArg ¶
ResolveArg resolves a step argument: a literal, a `$input`, or a `$step.field` projection from a completed step response.
func ResolveArgDry ¶
ResolveArgDry resolves an argument for a dry-run plan. Unavailable step output is left as a `${ref}` placeholder.
func Run ¶
func Run(ctx context.Context, c *cli.Command, steps []Step, strVars map[string]string, sliceVars map[string][]string, r Runner) (bindings map[string]any, lastRaw []byte, err error)
Run executes steps in order and returns the successfully completed prefix. A failure stops the sequence; it does not infer a recovery action.
func ScalarToString ¶
ScalarToString renders a JMESPath scalar for a later argument.
Types ¶
type Leaf ¶
type Leaf interface {
Label() string
}
Leaf is one resolved, authorized step target. The Runner that resolved it knows its concrete type (for example, an HTTP operation or exec grant).
type Resolve ¶
Resolve maps one argument value (a literal, $input, or $step.field) to its current bound string.
type Runner ¶
type Runner interface {
Fire(ctx context.Context, c *cli.Command, leaf Leaf, args []guardfile.ArgBind,
resolve Resolve, sliceOf SliceOf) (decoded any, raw []byte, err error)
Plan(ctx context.Context, leaf Leaf, args []guardfile.ArgBind,
resolve Resolve, sliceOf SliceOf) (map[string]any, error)
}
Runner fires or plans one already-resolved step.