Versions in this module Expand all Collapse all v1 v1.0.0 Feb 15, 2021 Changes in this version + var ErrActionFailed = errors.New("action execution failed") + var ErrCreateAccount = errors.New("create account") + var ErrInvalidActionType = errors.New("invalid action type") + var ErrInvalidInput = errors.New("invalid input") + var ErrInvalidJSON = errors.New("populated input is not valid JSON") + var ErrJobComplete = errors.New("job complete") + var ErrUnsatisfiable = errors.New("unsatisfiable balance") + var ErrVariableNotFound = errors.New("variable not found") + func AssertWorker(rawInput string) error + func FindCurrencyAmountWorker(rawInput string) (string, error) + func GenerateKeyWorker(rawInput string) (string, error) + func HTTPRequestWorker(rawInput string) (string, error) + func LoadEnvWorker(rawInput string) (string, error) + func MathWorker(rawInput string) (string, error) + func PopulateInput(state string, input string) (string, error) + func PrintMessageWorker(message string) + func RandomNumberWorker(rawInput string) (string, error) + func RandomStringWorker(rawInput string) (string, error) + type Error struct + Action *job.Action + ActionIndex int + Err error + Job string + Output string + ProcessedInput string + Scenario string + ScenarioIndex int + State string + Workflow string + func (e *Error) Log() + type Helper interface + AllAccounts func(context.Context, database.Transaction) ([]*types.AccountIdentifier, error) + Balance func(context.Context, database.Transaction, *types.AccountIdentifier, ...) (*types.Amount, error) + Coins func(context.Context, database.Transaction, *types.AccountIdentifier, ...) ([]*types.Coin, error) + Derive func(context.Context, *types.NetworkIdentifier, *types.PublicKey, ...) (*types.AccountIdentifier, map[string]interface{}, error) + LockedAccounts func(context.Context, database.Transaction) ([]*types.AccountIdentifier, error) + StoreKey func(context.Context, database.Transaction, *types.AccountIdentifier, *keys.KeyPair) error + type Worker struct + func New(helper Helper) *Worker + func (w *Worker) DeriveWorker(ctx context.Context, rawInput string) (string, error) + func (w *Worker) FindBalanceWorker(ctx context.Context, dbTx database.Transaction, rawInput string) (string, error) + func (w *Worker) Process(ctx context.Context, dbTx database.Transaction, j *job.Job) (*job.Broadcast, *Error) + func (w *Worker) ProcessNextScenario(ctx context.Context, dbTx database.Transaction, j *job.Job) *Error + func (w *Worker) SaveAccountWorker(ctx context.Context, dbTx database.Transaction, rawInput string) error