Documentation ¶
Index ¶
- Variables
- func EqualJSON(input string, expected string) (bool, interface{}, error)
- func EqualStrings(input string, expected string) (bool, interface{}, error)
- func EqualYAML(input string, expected string) (bool, interface{}, error)
- func Execute(t string, a map[string]interface{}, p *plan.Plan) (Action, ExecuteResult)
- func ExecuteComparison(p *plan.Plan, data string, path string, strbody string, ...) (interface{}, error)
- func IfaceToFloat(i interface{}) (float64, error)
- func LoadJSON(in string) (interface{}, error)
- func LoadString(in string) (interface{}, error)
- func LoadYAML(in string) (interface{}, error)
- func MatchingInterfaces(mFile interface{}, candidate interface{}) bool
- func ParseStringTemplate(p *plan.Plan, in string) string
- func ParseTemplate(p *plan.Plan, args map[string]interface{}) (map[string]interface{}, error)
- func Satisfy(t string, a map[string]interface{}) (bool, error)
- func SetLogger(t string)
- type Action
- type Actions
- type Advance
- func (a *Advance) Abort()
- func (a *Advance) CanBackground() bool
- func (a *Advance) Execute(p *plan.Plan) (r ExecuteResult)
- func (a *Advance) GetContext() (*context.Context, *context.CancelFunc)
- func (a *Advance) GetName() string
- func (a *Advance) IsBackgrounded() bool
- func (a *Advance) Satisfy() (bool, error)
- func (a *Advance) SetArgs(i map[string]interface{})
- type ArgStruct
- type Callback
- func (c *Callback) Abort()
- func (c *Callback) CanBackground() bool
- func (c *Callback) Execute(p *plan.Plan) (r ExecuteResult)
- func (c *Callback) GetContext() (*context.Context, *context.CancelFunc)
- func (c *Callback) GetName() string
- func (c *Callback) IsBackgrounded() bool
- func (c *Callback) Satisfy() (bool, error)
- func (c *Callback) SetArgs(i map[string]interface{})
- type CbFinish
- func (c *CbFinish) Abort()
- func (c *CbFinish) CanBackground() bool
- func (c *CbFinish) Execute(p *plan.Plan) (r ExecuteResult)
- func (c *CbFinish) GetContext() (*context.Context, *context.CancelFunc)
- func (c *CbFinish) GetName() string
- func (c *CbFinish) IsBackgrounded() bool
- func (c *CbFinish) Satisfy() (bool, error)
- func (c *CbFinish) SetArgs(i map[string]interface{})
- type CbSplit
- func (c *CbSplit) Abort()
- func (c *CbSplit) CanBackground() bool
- func (c *CbSplit) Execute(p *plan.Plan) (r ExecuteResult)
- func (c *CbSplit) GetContext() (*context.Context, *context.CancelFunc)
- func (c *CbSplit) GetName() string
- func (c *CbSplit) IsBackgrounded() bool
- func (c *CbSplit) Satisfy() (bool, error)
- func (c *CbSplit) SetArgs(i map[string]interface{})
- type Conditional
- func (c *Conditional) Abort()
- func (c *Conditional) CanBackground() bool
- func (c *Conditional) Execute(p *plan.Plan) (r ExecuteResult)
- func (c *Conditional) GetContext() (*context.Context, *context.CancelFunc)
- func (c *Conditional) GetName() string
- func (c *Conditional) IsBackgrounded() bool
- func (c *Conditional) Satisfy() (bool, error)
- func (c *Conditional) SetArgs(i map[string]interface{})
- type ConditionalOps
- func (c *ConditionalOps) Compare(op string) (bool, error)
- func (c *ConditionalOps) CompareEq() (bool, error)
- func (c *ConditionalOps) CompareGe() (bool, error)
- func (c *ConditionalOps) CompareGt() (bool, error)
- func (c *ConditionalOps) CompareLe() (bool, error)
- func (c *ConditionalOps) CompareLt() (bool, error)
- func (c *ConditionalOps) CompareNe() (bool, error)
- func (c *ConditionalOps) ConvertToFloat64() (float64, float64, error)
- type ExecuteResult
- type Log
- func (l *Log) Abort()
- func (l *Log) CanBackground() bool
- func (l *Log) Execute(p *plan.Plan) (r ExecuteResult)
- func (l *Log) GetContext() (*context.Context, *context.CancelFunc)
- func (l *Log) GetName() string
- func (l *Log) IsBackgrounded() bool
- func (l *Log) Satisfy() (bool, error)
- func (l *Log) SetArgs(i map[string]interface{})
- type Match
- func (m *Match) Abort()
- func (m *Match) CanBackground() bool
- func (m *Match) Execute(p *plan.Plan) (r ExecuteResult)
- func (m *Match) GetContext() (*context.Context, *context.CancelFunc)
- func (m *Match) GetName() string
- func (m *Match) IsBackgrounded() bool
- func (m *Match) LoadFile(n string, t string) (interface{}, error)
- func (m *Match) LoadString(b string, t string) (interface{}, error)
- func (m *Match) Satisfy() (bool, error)
- func (m *Match) SetArgs(i map[string]interface{})
- type Math
- func (w *Math) Abort()
- func (m *Math) CanBackground() bool
- func (w *Math) Execute(p *plan.Plan) (r ExecuteResult)
- func (m *Math) GetContext() (*context.Context, *context.CancelFunc)
- func (w *Math) GetName() string
- func (m *Math) IsBackgrounded() bool
- func (m *Math) Satisfy() (bool, error)
- func (m *Math) SetArgs(i map[string]interface{})
- type MathOps
- type QueueContext
- type Set
- func (s *Set) Abort()
- func (s *Set) CanBackground() bool
- func (s *Set) Execute(p *plan.Plan) (r ExecuteResult)
- func (s *Set) GetContext() (*context.Context, *context.CancelFunc)
- func (s *Set) GetName() string
- func (s *Set) IsBackgrounded() bool
- func (s *Set) Satisfy() (bool, error)
- func (s *Set) SetArgs(i map[string]interface{})
- type Test
- type URL
- func (u *URL) Abort()
- func (u *URL) CanBackground() bool
- func (u *URL) Execute(p *plan.Plan) (r ExecuteResult)
- func (u *URL) GetContext() (*context.Context, *context.CancelFunc)
- func (u *URL) GetName() string
- func (u *URL) IsBackgrounded() bool
- func (u *URL) Satisfy() (bool, error)
- func (u *URL) SetArgs(i map[string]interface{})
- func (u *URL) URLMatches(ctx *QueueContext) (bool, error)
- type Wait
- func (w *Wait) Abort()
- func (w *Wait) CanBackground() bool
- func (w *Wait) Execute(p *plan.Plan) (r ExecuteResult)
- func (w *Wait) GetContext() (*context.Context, *context.CancelFunc)
- func (w *Wait) GetName() string
- func (w *Wait) IsBackgrounded() bool
- func (w *Wait) Satisfy() (bool, error)
- func (w *Wait) SetArgs(i map[string]interface{})
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func EqualStrings ¶
EqualStrings returns a boolean value for string comparison, as well as error.
func Execute ¶
DoAction executes the respective action requested, executing callbacks, advancing, waiting, or resetting as needed.
func ExecuteComparison ¶
func ExecuteComparison(p *plan.Plan, data string, path string, strbody string, f func(string, string) (bool, interface{}, error)) (interface{}, error)
ExecuteComparison compares return body string and OnExpected value for a State's transaction.
func IfaceToFloat ¶
func MatchingInterfaces ¶
func MatchingInterfaces(mFile interface{}, candidate interface{}) bool
MatchingInterfaces identifies if interface types and interface contents match.
func ParseTemplate ¶
Types ¶
type Action ¶
type Action interface { Execute(*plan.Plan) ExecuteResult Abort() GetName() string SetArgs(map[string]interface{}) Satisfy() (bool, error) GetContext() (*context.Context, *context.CancelFunc) CanBackground() bool IsBackgrounded() bool }
implementation note: Satisfy is implemented across all actions, but it only makes sense in some. Actions that do not have an internal state do not make sense to advance, as there is nothing that will allow us to determine whether a condition is satisfied.
type Actions ¶
func NewActions ¶
func NewActions() *Actions
type Advance ¶
func (*Advance) CanBackground ¶
func (*Advance) GetContext ¶
func (a *Advance) GetContext() (*context.Context, *context.CancelFunc)
func (*Advance) IsBackgrounded ¶
type Callback ¶
func (*Callback) CanBackground ¶
func (*Callback) GetContext ¶
func (c *Callback) GetContext() (*context.Context, *context.CancelFunc)
func (*Callback) IsBackgrounded ¶
type CbFinish ¶
func (*CbFinish) CanBackground ¶
func (*CbFinish) GetContext ¶
func (c *CbFinish) GetContext() (*context.Context, *context.CancelFunc)
func (*CbFinish) IsBackgrounded ¶
type CbSplit ¶
func (*CbSplit) CanBackground ¶
func (*CbSplit) GetContext ¶
func (c *CbSplit) GetContext() (*context.Context, *context.CancelFunc)
func (*CbSplit) IsBackgrounded ¶
type Conditional ¶
func (*Conditional) Abort ¶
func (c *Conditional) Abort()
func (*Conditional) CanBackground ¶
func (c *Conditional) CanBackground() bool
func (*Conditional) Execute ¶
func (c *Conditional) Execute(p *plan.Plan) (r ExecuteResult)
func (*Conditional) GetContext ¶
func (c *Conditional) GetContext() (*context.Context, *context.CancelFunc)
func (*Conditional) GetName ¶
func (c *Conditional) GetName() string
func (*Conditional) IsBackgrounded ¶
func (c *Conditional) IsBackgrounded() bool
func (*Conditional) Satisfy ¶
func (c *Conditional) Satisfy() (bool, error)
func (*Conditional) SetArgs ¶
func (c *Conditional) SetArgs(i map[string]interface{})
type ConditionalOps ¶
type ConditionalOps struct { LeftOp interface{} RightOp interface{} // contains filtered or unexported fields }
func NewConditionalOps ¶
func NewConditionalOps() *ConditionalOps
func (*ConditionalOps) CompareEq ¶
func (c *ConditionalOps) CompareEq() (bool, error)
func (*ConditionalOps) CompareGe ¶
func (c *ConditionalOps) CompareGe() (bool, error)
func (*ConditionalOps) CompareGt ¶
func (c *ConditionalOps) CompareGt() (bool, error)
func (*ConditionalOps) CompareLe ¶
func (c *ConditionalOps) CompareLe() (bool, error)
func (*ConditionalOps) CompareLt ¶
func (c *ConditionalOps) CompareLt() (bool, error)
func (*ConditionalOps) CompareNe ¶
func (c *ConditionalOps) CompareNe() (bool, error)
func (*ConditionalOps) ConvertToFloat64 ¶
func (c *ConditionalOps) ConvertToFloat64() (float64, float64, error)
type ExecuteResult ¶
type ExecuteResult struct { Err error Complete bool Success bool Advance bool NewTxn string RegisterURL string RegisterUUID uuid.UUID }
func DoCallback ¶
type Log ¶
func (*Log) CanBackground ¶
func (*Log) GetContext ¶
func (l *Log) GetContext() (*context.Context, *context.CancelFunc)
func (*Log) IsBackgrounded ¶
type Match ¶
func (*Match) CanBackground ¶
func (*Match) GetContext ¶
func (m *Match) GetContext() (*context.Context, *context.CancelFunc)
func (*Match) IsBackgrounded ¶
type Math ¶
func (*Math) CanBackground ¶
func (*Math) GetContext ¶
func (m *Math) GetContext() (*context.Context, *context.CancelFunc)
func (*Math) IsBackgrounded ¶
type MathOps ¶
type MathOps struct { LeftOp interface{} RightOp interface{} // contains filtered or unexported fields }
type QueueContext ¶
type Set ¶
func (*Set) CanBackground ¶
func (*Set) GetContext ¶
func (s *Set) GetContext() (*context.Context, *context.CancelFunc)
func (*Set) IsBackgrounded ¶
type Test ¶
func (*Test) Execute ¶
func (t *Test) Execute(p *plan.Plan) (r ExecuteResult)
This is a no-op solely for testing.
func (*Test) GetContext ¶
func (a *Test) GetContext() (*context.Context, *context.CancelFunc)
type URL ¶
func (*URL) CanBackground ¶
func (*URL) GetContext ¶
func (u *URL) GetContext() (*context.Context, *context.CancelFunc)
func (*URL) IsBackgrounded ¶
func (*URL) URLMatches ¶
func (u *URL) URLMatches(ctx *QueueContext) (bool, error)
type Wait ¶
func (*Wait) CanBackground ¶
func (*Wait) GetContext ¶
func (w *Wait) GetContext() (*context.Context, *context.CancelFunc)
func (*Wait) IsBackgrounded ¶
Click to show internal directories.
Click to hide internal directories.