js

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//GlobalKey  global properties key,call them through the global.xx method
	GlobalKey = "global"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GojaJsEngine

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

GojaJsEngine goja js engine

func NewGojaJsEngine

func NewGojaJsEngine(config types.Config, jsScript string, fromVars map[string]interface{}) (*GojaJsEngine, error)

NewGojaJsEngine Create a new instance of the JavaScript engine

func (*GojaJsEngine) Execute

func (g *GojaJsEngine) Execute(functionName string, argumentList ...interface{}) (out interface{}, err error)

Execute Execute JavaScript script

func (*GojaJsEngine) NewVm added in v0.20.0

func (g *GojaJsEngine) NewVm(config types.Config, fromVars map[string]interface{}) *goja.Runtime

NewVm new a js VM

func (*GojaJsEngine) PreCompileJs added in v0.20.0

func (g *GojaJsEngine) PreCompileJs(config types.Config) error

PreCompileJs Precompiled UDF JavaScript file

func (*GojaJsEngine) Stop

func (g *GojaJsEngine) Stop()

Jump to

Keyboard shortcuts

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