Documentation ¶
Index ¶
- func DeleteFunction(name string)
- func DeleteFunctionVariant(name string, idx int)
- func DeleteVariable(name string)
- func DropFunctions()
- func DropVariables()
- func GetVariable(name string) (val interface{}, found bool)
- func HasFunction(name string) bool
- func HasVariable(name string) bool
- func ListFunctions() map[string]Func
- func ListVariables() map[string]interface{}
- func Predict(word string) string
- func SetFunction(name string, function Func)
- func SetFunctionVariant(name string, variant FuncVariant)
- func SetVariable(name string, val interface{})
- type Func
- type FuncVariant
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteFunction ¶ added in v1.1.0
func DeleteFunction(name string)
Delete user function with name.
func DeleteFunctionVariant ¶ added in v1.2.0
Delete user function variant by id.
func DeleteVariable ¶ added in v1.1.0
func DeleteVariable(name string)
Delete user variable with given name.
func GetVariable ¶ added in v1.1.0
Get user variable with given name.
func HasFunction ¶ added in v1.1.0
Is function presented in the user functions map.
func HasVariable ¶ added in v1.1.0
Is variable with name presented in the user variables map.
func ListFunctions ¶ added in v1.1.0
Return the user function map.
func ListVariables ¶ added in v1.1.0
func ListVariables() map[string]interface{}
Return the user variables map.
func SetFunction ¶ added in v1.1.0
Set user function with given name.
func SetFunctionVariant ¶ added in v1.1.0
func SetFunctionVariant(name string, variant FuncVariant)
Set function varian for the funtion with given name.
func SetVariable ¶ added in v1.1.0
func SetVariable(name string, val interface{})
Set user variable with name and value.
Types ¶
type Func ¶
type Func struct {
Variants []FuncVariant
}
func GetFunction ¶ added in v1.1.0
Get user function by name from the user functions map.
type FuncVariant ¶ added in v1.1.0
func (FuncVariant) ArgNames ¶ added in v1.1.0
func (v FuncVariant) ArgNames() (pos []string)
Return argument names of function variant as strings slice.
func (FuncVariant) String ¶ added in v1.1.0
func (v FuncVariant) String() string
fmt.Stringer interface implementation.
Click to show internal directories.
Click to hide internal directories.