active

package
v0.0.0-...-3f97f43 Latest Latest
Warning

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

Go to latest
Published: May 28, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaulLookupTemplate func(string, ...interface{}) (io.Reader, error) = nil

Functions

func LoadGlobalModule

func LoadGlobalModule(modulepath string, a ...interface{}) (err error)

func RetrieveModule

func RetrieveModule(modulepath ...string) (modules []*goja.Program)

func UnloadGlobalModule

func UnloadGlobalModule(modulepath string) (existed bool)

Types

type Active

type Active struct {
	Print          func(a ...interface{}) (err error)
	Println        func(a ...interface{}) (err error)
	BinWrite       func(b ...byte) (n int, err error)
	FPrint         func(w io.Writer, a ...interface{}) error
	FPrintLn       func(w io.Writer, a ...interface{}) error
	FBinWrite      func(w io.Writer, b ...byte) (n int, err error)
	Seek           func(offset int64, whence int) (n int64, err error)
	Readln         func() (string, error)
	ReadLines      func() ([]string, error)
	ReadAll        func() (string, error)
	BinRead        func(size int) (b []byte, err error)
	FSeek          func(io.Reader, int64, int) (int64, error)
	FReadln        func(io.Reader) (string, error)
	FReadLines     func(io.Reader) ([]string, error)
	FReadAll       func(io.Reader) (string, error)
	FBinRead       func(io.Reader, int) ([]byte, error)
	LookupTemplate func(string, ...interface{}) (io.Reader, error)
	ObjectMapRef   func() map[string]interface{}
	CleanupValue   func(vali interface{}, valt reflect.Type)
	//lckprnt        *sync.Mutex
	InterruptVM func(v interface{})
	// contains filtered or unexported fields
}

Active - struct

func NewActive

func NewActive() (atv *Active)

NewActive - instance

func (Active) AltActv

func (atvrntme Active) AltActv() (atvactv parsing.AltActiveAPI)

func (*Active) AltBinRead

func (atv *Active) AltBinRead(r io.Reader, size int) (b []byte, err error)

func (*Active) AltBinWrite

func (atv *Active) AltBinWrite(w io.Writer, b ...byte) (n int, err error)

func (*Active) AltLookupTemplate

func (atv *Active) AltLookupTemplate(path string, a ...interface{}) (r io.Reader, err error)

func (*Active) AltObjectRef

func (atv *Active) AltObjectRef() (objref map[string]interface{})

func (*Active) AltPrint

func (atv *Active) AltPrint(w io.Writer, a ...interface{}) (err error)

func (*Active) AltPrintln

func (atv *Active) AltPrintln(w io.Writer, a ...interface{}) (err error)

func (*Active) AltReadAll

func (atv *Active) AltReadAll(r io.Reader) (s string, err error)

func (*Active) AltReadlines

func (atv *Active) AltReadlines(r io.Reader) (lines []string, err error)

func (*Active) AltReadln

func (atv *Active) AltReadln(r io.Reader) (ln string, err error)

func (*Active) AltSeek

func (atv *Active) AltSeek(r io.Reader, offset int64, whence int) (n int64, err error)

func (*Active) Clear

func (atv *Active) Clear() (err error)

Clear

func (*Active) Close

func (atv *Active) Close() (err error)

Close - refer to io.Closer

func (*Active) Dispose

func (atv *Active) Dispose() (err error)

Dispose

func (*Active) Eval

func (atv *Active) Eval(wout io.Writer, rin io.Reader, initpath string, invertactpsv bool, a ...interface{}) (err error)

Eval - parse a ...interface{} arguments, execute if neaded and output to wou io.Writer

func (*Active) ExtractGlobals

func (atv *Active) ExtractGlobals(extrglbs map[string]interface{})

ExtractGlobals extract globals from atv.atvruntime

func (*Active) ImportGlobals

func (atv *Active) ImportGlobals(imprtglbs map[string]interface{})

ImportGlobals import globals into atv.atvruntime

func (*Active) Interrupt

func (atv *Active) Interrupt()

Interrupt - Active processing

func (*Active) InvokeFunction

func (atv *Active) InvokeFunction(functocall interface{}, args ...interface{}) (result interface{})

InvokeFunction ivoke *Acive.actvruntime function

func (*Active) InvokeVM

func (atv *Active) InvokeVM(callback func(vm *goja.Runtime) error)

InvokeVM invoke vm

func (*Active) ProcessParsing

func (atv *Active) ProcessParsing(prsng *parsing.Parsing) (err error)

type CodeException

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

func (*CodeException) Code

func (cdeerr *CodeException) Code() string

func (*CodeException) Error

func (cdeerr *CodeException) Error() (s string)

func (*CodeException) ExecPath

func (cdeerr *CodeException) ExecPath() string

type Runtime

type Runtime interface {
	InvokeFunction(interface{}, ...interface{}) interface{}
}

Runtime - interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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