Documentation ¶
Index ¶
- func CallCommandFunction(from interface{}, name string, first interface{}, rest map[string]interface{}) (interface{}, error)
- func GetFunctionByName(from interface{}, name string) (reflect.Value, error)
- func ListModuleCommands(module Module, skipNames ...string) []string
- type DefaultExecutor
- type Module
- type RunOptions
- type Runnable
- type Scopeable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallCommandFunction ¶
func GetFunctionByName ¶
func ListModuleCommands ¶
Types ¶
type DefaultExecutor ¶
type DefaultExecutor struct {
// contains filtered or unexported fields
}
func NewDefaultExecutor ¶
func NewDefaultExecutor(from interface{}) *DefaultExecutor
func (*DefaultExecutor) ExecuteCommand ¶
func (self *DefaultExecutor) ExecuteCommand(name string, arg interface{}, objargs map[string]interface{}) (interface{}, error)
func (*DefaultExecutor) FormatCommandName ¶
func (self *DefaultExecutor) FormatCommandName(name string) string
func (*DefaultExecutor) SetInstance ¶
func (self *DefaultExecutor) SetInstance(from interface{})
type RunOptions ¶
type RunOptions struct { // If true, the scope of the running script will not inherit values from the calling scope. Isolated bool `json:"isolated"` // Specifies a key in the scope of the evaluate script that will be used as the result value of this command. ResultKey string `json:"result"` // Provides a set of initial variables to the script. Data map[string]interface{} `json:"data"` // Sets the base path from which relative file lookups will be performed BasePath string `json:"-"` }
type Runnable ¶ added in v1.0.0
type Runnable interface {
Run(scriptName string, options *RunOptions) (interface{}, error)
}
Click to show internal directories.
Click to hide internal directories.