scripts

package
v2.8.7 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

func NewEngine

func NewEngine() *Engine

func (*Engine) Execute

func (m *Engine) Execute(s Script, arg interface{}, opts ...ExecOption) (interface{}, error)

type ExecOption

type ExecOption func(opt *configOptions)

func WithFieldNameMapper

func WithFieldNameMapper(fieldNameMapper goja.FieldNameMapper) ExecOption

func WithLogging

func WithLogging(logBuf *bytes.Buffer) ExecOption

func WithScriptTimeout

func WithScriptTimeout(duration time.Duration) ExecOption

func WithSet

func WithSet(name string, f interface{}) ExecOption

type Script

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

func NewScript

func NewScript(source ...[]byte) (Script, error)

Jump to

Keyboard shortcuts

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