Documentation
¶
Index ¶
- func InitCache()
- func InitPtrStore() (getPtrStore fnGetPtrStore, delPtrStore fnDelPtrStore)
- type JsContext
- func (ctx *JsContext) BindFunc(funcName string, funcVarPtr interface{}) (err error)
- func (ctx *JsContext) BindFuncs(funcName2FuncVarPtr map[string]interface{}) (err error)
- func (ctx *JsContext) CallFunc(funcName string, args ...interface{}) (res interface{}, err error)
- func (ctx *JsContext) Eval(script string, env map[string]interface{}) (res interface{}, err error)
- func (ctx *JsContext) EvalFile(scriptFile string, env map[string]interface{}) (res interface{}, err error)
- func (ctx *JsContext) GetGlobal(name string) (res interface{}, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitPtrStore ¶ added in v0.5.0
func InitPtrStore() (getPtrStore fnGetPtrStore, delPtrStore fnDelPtrStore)
Types ¶
type JsContext ¶
type JsContext struct {
// contains filtered or unexported fields
}
func LoadFileFromCache ¶ added in v0.1.3
func NewContext ¶
func (*JsContext) BindFunc ¶
bind a var of golang func with a JS function name, so calling JS function is just calling the related golang func. @param funcVarPtr in format `var funcVar func(....) ...; funcVarPtr = &funcVar`
Click to show internal directories.
Click to hide internal directories.