executable

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: Apache-2.0 Imports: 1 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrSequenceShouldReturn is represents a failed function call that should result in a return.
	ErrSequenceShouldReturn = errors.New("function resulted in a Run Error and sequence should return")
	ErrSequenceCompleted    = errors.New("sequence is complete, no steps to run")
)

Functions

This section is empty.

Types

type ErrHandler

type ErrHandler struct {
	Code  map[int]string `yaml:"code,omitempty" json:"code,omitempty"`
	Any   string         `yaml:"any,omitempty" json:"any,omitempty"`
	Other string         `yaml:"other,omitempty" json:"other,omitempty"`
}

ErrHandler describes how to handle an error from a function call.

type Executable

type Executable struct {
	ExecutableMod `yaml:"executableMod,inline" json:"executableMod"`
	Group         []ExecutableMod `yaml:"group,omitempty" json:"group,omitempty"`
	ForEach       interface{}     `yaml:"forEach,omitempty"`
}

Executable represents an executable step in a handler

func (Executable) IsFn

func (e Executable) IsFn() bool

IsFn returns true if the executable is a group.

func (Executable) IsGroup

func (e Executable) IsGroup() bool

IsGroup returns true if the executable is a group.

type ExecutableMod

type ExecutableMod struct {
	FQMN  string            `yaml:"-" json:"fqmn"` // calculated during Validate.
	As    string            `yaml:"as,omitempty" json:"as,omitempty"`
	With  map[string]string `yaml:"with,omitempty" json:"with,omitempty"`
	OnErr *ErrHandler       `yaml:"onErr,omitempty" json:"onErr,omitempty"`
}

ExecutableMod is a fn along with its "variable name" and "args".

func (ExecutableMod) Key

func (c ExecutableMod) Key() string

func (ExecutableMod) ShouldReturn

func (c ExecutableMod) ShouldReturn(code int) error

Jump to

Keyboard shortcuts

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