Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine interface { // SetState sets the given state s // to the global state of the runtime. SetState(s State) // Set sets the given value by the given // name to the global context of the runtime. Set(name string, v any) error // Run executes the given script in the // runtime. Run(script string) error // State returns a map of all set // variables in the global state // which are not of the type 'function'. State() State }
Engine defines a service which can run scripts.
type Exception ¶ added in v0.7.0
type Exception struct { errs.InnerError Msg string }
Exception wraps an engine execution error and holds a simple message concluding the error.
type Goja ¶
type Goja struct {
// contains filtered or unexported fields
}
Goja is the Engine implementation using ECMAScript 5.
Click to show internal directories.
Click to hide internal directories.