context

package
v1.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2021 License: BSD-3-Clause Imports: 9 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataContext

type DataContext struct {
	// contains filtered or unexported fields
}

func NewDataContext

func NewDataContext() *DataContext

func (*DataContext) Add

func (dc *DataContext) Add(key string, obj interface{})

func (*DataContext) Del

func (dc *DataContext) Del(keys ...string)

func (*DataContext) ExecFunc

func (dc *DataContext) ExecFunc(Vars map[string]reflect.Value, funcName string, parameters []reflect.Value) (reflect.Value, error)

* execute the injected functions: a(..) function execute supply multi return values, but simplify ,just return one value

func (*DataContext) ExecMethod

func (dc *DataContext) ExecMethod(Vars map[string]reflect.Value, methodName string, args []reflect.Value) (reflect.Value, error)

* execute the struct's functions: a.b(..) function execute supply multi return values, but simplify ,just return one value

func (*DataContext) ExecThreeLevel added in v1.5.2

func (dc *DataContext) ExecThreeLevel(Vars map[string]reflect.Value, threeLevelName string, args []reflect.Value) (reflect.Value, error)

* execute the struct's functions: a.b.c(..) function execute supply multi return values, but simplify ,just return one value

func (*DataContext) Get

func (dc *DataContext) Get(key string) (reflect.Value, error)

func (*DataContext) GetValue

func (dc *DataContext) GetValue(Vars map[string]reflect.Value, variable string) (reflect.Value, error)

* get the value user set

func (*DataContext) PluginLoader

func (dc *DataContext) PluginLoader(absolutePathOfSO string) (string, plugin.Symbol, error)

plugin_exportName_apiName.so _ is a separator plugin is prefix exportName is user export in plugin file apiName is plugin used in gengine

func (*DataContext) SetMapVarValue

func (dc *DataContext) SetMapVarValue(Vars map[string]reflect.Value, mapVarName, mapVarStrkey, mapVarVarkey string, mapVarIntkey int64, setValue reflect.Value) error

func (*DataContext) SetValue

func (dc *DataContext) SetValue(Vars map[string]reflect.Value, variable string, newValue reflect.Value) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL