Versions in this module Expand all Collapse all v0 v0.9.2 Jan 13, 2023 Changes in this version + var DefaultFactory = map[string]any + type Action struct + func (action *Action) GetNext(k interface{}) IExecutor + func (action *Action) GetScriptLines() []ScriptLine + func (action *Action) GetState() ExecutorState + func (action *Action) Run(ctx context.Context, signalControl chan ActionControl, varPool VarPool) ([]interface{}, error) + func (action *Action) SetNext(k interface{}, exec IExecutor) + type ActionAdd struct + func (s *ActionAdd) Continue() error + func (s *ActionAdd) Pause() error + func (s *ActionAdd) Start() error + func (s *ActionAdd) Stop() error + type ActionBreak struct + func (s *ActionBreak) Continue() error + func (s *ActionBreak) Pause() error + func (s *ActionBreak) Start() error + func (s *ActionBreak) Stop() error + type ActionContinue struct + func (s *ActionContinue) Continue() error + func (s *ActionContinue) Pause() error + func (s *ActionContinue) Start() error + func (s *ActionContinue) Stop() error + type ActionControl uint8 + const ActionControlContinue + const ActionControlPause + const ActionControlStop + func (t ActionControl) String() string + type ActionDeclare struct + func (s *ActionDeclare) Continue() error + func (s *ActionDeclare) Pause() error + func (s *ActionDeclare) Start() error + func (s *ActionDeclare) Stop() error + type ActionJson struct + Inputs []interface{} + IsGo bool + Outputs []string + type ActionPrint struct + func (s *ActionPrint) Continue() error + func (s *ActionPrint) Pause() error + func (s *ActionPrint) Start() error + func (s *ActionPrint) Stop() error + type ActionPrintf struct + func (s *ActionPrintf) Continue() error + func (s *ActionPrintf) Pause() error + func (s *ActionPrintf) Start() error + func (s *ActionPrintf) Stop() error + type ActionReturn struct + func (s *ActionReturn) Continue() error + func (s *ActionReturn) Pause() error + func (s *ActionReturn) Start() error + func (s *ActionReturn) Stop() error + type ActionSleep struct + func (s *ActionSleep) Continue() error + func (s *ActionSleep) Pause() error + func (s *ActionSleep) Start() error + func (s *ActionSleep) Stop() error + type ActionTree struct + func (tree ActionTree) GetScriptLines() []ScriptLine + func (tree ActionTree) String() string + type BFeedbackReporter struct + func (r BFeedbackReporter) Complete(returns ...interface{}) + func (r BFeedbackReporter) Feedback(t FeedbackType, returns []interface{}, err error) + func (r BFeedbackReporter) FeedbackNoContent(t FeedbackType) + type ExecutorState uint8 + const ExecutorStateComplete + const ExecutorStateContinuing + const ExecutorStateError + const ExecutorStateIdle + const ExecutorStatePaused + const ExecutorStatePausing + const ExecutorStateRunning + const ExecutorStateStopped + const ExecutorStateStopping + func (state ExecutorState) String() string + type ExprJson struct + Condition interface{} + SubSteps map[string][]StatementJson + type Expression struct + func (expr *Expression) Do(varPool VarPool) (interface{}, bool, error) + func (expr *Expression) GetNext(k interface{}) IExecutor + func (expr *Expression) GetScriptLines() []ScriptLine + func (expr *Expression) GetState() ExecutorState + func (expr *Expression) SetNext(k interface{}, exec IExecutor) + type Feedback struct + type FeedbackType uint8 + const FBComplete + const FBContinueSuccess + const FBPauseSuccess + const FBRunningError + const FBStartSuccess + const FBStopSuccess + func (t FeedbackType) String() string + type IAction interface + Continue func() error + Pause func() error + Start func() error + Stop func() error + func MakeAdd(reporter *BFeedbackReporter, x, y int) (IAction, error) + func MakeBreak(reporter *BFeedbackReporter) (IAction, error) + func MakeContinue(reporter *BFeedbackReporter) (IAction, error) + func MakeDeclare(reporter *BFeedbackReporter, value interface{}) (IAction, error) + func MakePrint(reporter *BFeedbackReporter, args []interface{}) (IAction, error) + func MakePrintf(reporter *BFeedbackReporter, format string, args []interface{}) (IAction, error) + func MakeReturn(reporter *BFeedbackReporter) (IAction, error) + func MakeSleep(reporter *BFeedbackReporter, seconds float64) (IAction, error) + type ICycleExpr interface + CycleExpr func() + type IExecutor interface + GetNext func(k interface{}) IExecutor + GetScriptLines func() []ScriptLine + GetState func() ExecutorState + SetNext func(k interface{}, exec IExecutor) + type IExpr interface + Expr func(condition interface{}) (interface{}, error) + type Inputs []interface + func (inputs Inputs) String() string + type Outputs []string + func (outputs Outputs) String() string + type Parser struct + func NewParser(factory map[string]any) *Parser + func (p Parser) Parse(data []byte) (*ActionTree, error) + type ScriptLine struct + type StatementJson struct + Name string + Params djson.Raw + Retry int + Type StatementType + type StatementType uint8 + const StatementAction + const StatementExpr + type TaskJson struct + Name string + Statements []StatementJson + type TaskRunner struct + func NewRunner(actionTree *ActionTree) *TaskRunner + func (runner *TaskRunner) Continue() error + func (runner *TaskRunner) GetScript() string + func (runner *TaskRunner) Pause() error + func (runner *TaskRunner) Print() + func (runner *TaskRunner) Start() error + func (runner *TaskRunner) Stop() error + type VarPool map[string]interface + func (pool *VarPool) Add(key string, value interface{}) + func (pool *VarPool) MakeInput(inputs ...interface{}) ([]interface{}, error) + func (pool *VarPool) Merge(another VarPool) + func (pool *VarPool) SaveOutputs(keys []string, value ...interface{}) error + func (pool *VarPool) String() string + func (pool *VarPool) Summary(another VarPool)