Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(code string, variables VariableSource) (interface{}, error)
Run executes the given code with the provided variable context. The resulting value and a potential error is returned.
func RunContained ¶
func RunContained(code string, variables VariableSource) (interface{}, error)
RunContainer executes the given code in a separate runtime with the provided variable context. It behaves like Run but it supports multi threading by using it's own separate runtime for each call.
Types ¶
type Script ¶
type Script struct {
// contains filtered or unexported fields
}
func (*Script) Call ¶
func (s *Script) Call(variables VariableSource, arguments ...interface{}) (interface{}, error)
Call executes the script in the assumption that it defines a function. It will then call this function using the provided arguments. The value returned by that function will in turn be returned by this method.
func (*Script) Run ¶
func (s *Script) Run(variables VariableSource) (interface{}, error)
type VariableBridge ¶
type VariableBridge struct {
Source VariableSource
}
func (*VariableBridge) Delete ¶
func (b *VariableBridge) Delete(key string) bool
func (*VariableBridge) Has ¶
func (b *VariableBridge) Has(key string) bool
func (*VariableBridge) Keys ¶
func (b *VariableBridge) Keys() []string
type VariableSource ¶
Click to show internal directories.
Click to hide internal directories.