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 CallableFn ¶
type CallableFn struct {
Fn string `yaml:"fn,omitempty" json:"fn,omitempty"`
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"`
FQFN string `yaml:"-" json:"fqfn"` // calculated during Validate.
}
CallableFn is a fn along with its "variable name" and "args".
func (CallableFn) Key ¶
func (c CallableFn) Key() string
func (CallableFn) ShouldReturn ¶
func (c CallableFn) ShouldReturn(code int) error
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 {
CallableFn `yaml:"callableFn,inline" json:"callableFn"`
Group []CallableFn `yaml:"group,omitempty" json:"group,omitempty"`
ForEach interface{} `yaml:"forEach,omitempty"`
}
Executable represents an executable step in a handler The 'ForEach' type has been disabled and removed as of Atmo v0.4.0.
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.
Click to show internal directories.
Click to hide internal directories.