Documentation
¶
Index ¶
- func ExportForDev() string
- func FindPath(vm *goja.Runtime, filename string) string
- func GetFunc(v goja.Value) goja.Callable
- func GetLogger(vm *goja.Runtime) *log.Logger
- func Register(name string, mod Module)
- func Run(code string, refFile string, args ...any) (any, error)
- func RunFile(file string, args ...any) (any, error)
- func RunProgram(plg *Program, args ...any) (any, error)
- type Args
- func (args *Args) Any(index int) any
- func (args *Args) Arr(startIndex int) []any
- func (args *Args) Bool(index int) bool
- func (args *Args) Bytes(index int) []byte
- func (args *Args) Check(num int) *Args
- func (args *Args) Func(index int) goja.Callable
- func (args *Args) Int(index int) int
- func (args *Args) Int64(index int) int64
- func (args *Args) Map(index int) map[string]any
- func (args *Args) Map2Arr(index int) []any
- func (args *Args) Map2StrArr(index int) []string
- func (args *Args) Obj(index int) *Obj
- func (args *Args) Object(index int) *goja.Object
- func (args *Args) Path(index int) string
- func (args *Args) Str(index int) string
- func (args *Args) StrArr(startIndex int) []string
- type LB
- type LBConfig
- type Map
- type Module
- type Obj
- func (obj *Obj) Any(name string) any
- func (obj *Obj) Arr(name string) []any
- func (obj *Obj) Bool(name string) bool
- func (obj *Obj) Bytes(name string) []byte
- func (obj *Obj) Func(name string) goja.Callable
- func (obj *Obj) Get(name string) goja.Value
- func (obj *Obj) Int(name string) int
- func (obj *Obj) Int64(name string) int64
- func (obj *Obj) Map(name string) map[string]any
- func (obj *Obj) Object(name string) *goja.Object
- func (obj *Obj) Path(name string) string
- func (obj *Obj) Str(name string) string
- type Pool
- type PoolConfig
- type Program
- type Runtime
- func (rt *Runtime) GetCallStack() []string
- func (rt *Runtime) GetGoData(name string) any
- func (rt *Runtime) RunCode(code string) (any, error)
- func (rt *Runtime) RunFile(file string) (any, error)
- func (rt *Runtime) RunMain(args ...any) (any, error)
- func (rt *Runtime) RunProgram(prg *Program) (any, error)
- func (rt *Runtime) RunVM(callback func(vm *goja.Runtime) (any, error)) (any, error)
- func (rt *Runtime) Set(name string, value any) error
- func (rt *Runtime) SetGlobal(global Map) error
- func (rt *Runtime) SetGoData(name string, value any)
- func (rt *Runtime) SetModuleLoader(fn func(filename string) string)
- func (rt *Runtime) StartFromCode(code, refFile string) error
- func (rt *Runtime) StartFromFile(file string) error
- func (rt *Runtime) StartFromProgram(plg *Program) error
- type WatchRunner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportForDev ¶ added in v0.1.0
func ExportForDev() string
Types ¶
type Args ¶ added in v0.1.0
func (*Args) Map2StrArr ¶ added in v0.1.0
type LB ¶ added in v0.1.3
type LB struct {
// contains filtered or unexported fields
}
func NewLBByCode ¶ added in v0.1.3
func NewLBByFile ¶ added in v0.1.3
type Map ¶ added in v0.1.0
func MakeLogger ¶ added in v0.1.3
type Pool ¶ added in v0.1.3
type Pool struct {
// contains filtered or unexported fields
}
func NewPoolByCode ¶ added in v0.1.3
func NewPoolByCode(code, refFile string, opt PoolConfig, logger *log.Logger) *Pool
func NewPoolByFile ¶ added in v0.1.3
func NewPoolByFile(file string, opt PoolConfig, logger *log.Logger) *Pool
type PoolConfig ¶ added in v0.1.3
type Program ¶ added in v0.1.3
type Program struct {
// contains filtered or unexported fields
}
func CompileFile ¶ added in v0.1.3
type Runtime ¶ added in v0.1.0
type Runtime struct {
// contains filtered or unexported fields
}
func (*Runtime) GetCallStack ¶ added in v0.1.0
func (*Runtime) RunProgram ¶ added in v0.1.3
func (*Runtime) SetModuleLoader ¶ added in v0.1.0
func (*Runtime) StartFromCode ¶ added in v0.1.0
func (*Runtime) StartFromFile ¶ added in v0.1.0
func (*Runtime) StartFromProgram ¶ added in v0.1.3
type WatchRunner ¶ added in v0.1.0
type WatchRunner struct {
// contains filtered or unexported fields
}
func WatchRun ¶ added in v0.1.0
func WatchRun(file string, extDirs, extTypes []string, args ...any) (*WatchRunner, error)
func (*WatchRunner) Stop ¶ added in v0.1.0
func (wr *WatchRunner) Stop()
func (*WatchRunner) WaitForKill ¶ added in v0.1.0
func (wr *WatchRunner) WaitForKill()
Directories
¶
Path | Synopsis |
---|---|
dop251
|
|
base64dec
Package base64dec contains a universal base64 decoder that works on both the standard and url-safe variants, padded and raw.
|
Package base64dec contains a universal base64 decoder that works on both the standard and url-safe variants, padded and raw. |
goja/ast
Package ast declares types representing a JavaScript AST.
|
Package ast declares types representing a JavaScript AST. |
goja/file
Package file encapsulates the file abstractions used by the ast & parser.
|
Package file encapsulates the file abstractions used by the ast & parser. |
goja/ftoa
Package ftoa provides ECMAScript-compliant floating point number conversion to string.
|
Package ftoa provides ECMAScript-compliant floating point number conversion to string. |
goja/ftoa/internal/fast
Package fast contains code ported from V8 (https://github.com/v8/v8/blob/master/src/numbers/fast-dtoa.cc)
|
Package fast contains code ported from V8 (https://github.com/v8/v8/blob/master/src/numbers/fast-dtoa.cc) |
goja/parser
Package parser implements a parser for JavaScript.
|
Package parser implements a parser for JavaScript. |
goja/token
Package token defines constants representing the lexical tokens of JavaScript (ECMA5).
|
Package token defines constants representing the lexical tokens of JavaScript (ECMA5). |
goja/unistring
Package unistring contains an implementation of a hybrid ASCII/UTF-16 string.
|
Package unistring contains an implementation of a hybrid ASCII/UTF-16 string. |
Click to show internal directories.
Click to hide internal directories.