Documentation ¶
Index ¶
- func LoadPluginsConfig(filename string)
- func MakeAllPluginCode()
- func MakeFromJsValue(in quickjs.Value, ctx *plugin.Context) interface{}
- func MakeJsValue(ctx *plugin.Context, in interface{}, inArray bool) quickjs.Value
- func MakeJsValueForPlugin(ctx *plugin.Context, in interface{}, pluginName string, inArray bool) quickjs.Value
- func MakePluginCode(plg *plugin.Plugin) (exportCode, interfaceCode string)
- func SetPluginsConfig(conf map[string]plugin.Config)
- type ArgInfo
- type JSError
- func Run(code string, option *RuntimeOption) (out interface{}, jsErr *JSError)
- func RunAt(code, dir string, option *RuntimeOption) (out interface{}, jsErr *JSError)
- func RunFile(filename string, option *RuntimeOption) (out interface{}, jsErr *JSError)
- func RunPreCompiled(cc *PreCompiledCode, option *RuntimeOption) (out interface{}, jsErr *JSError)
- type JSRuntime
- func (rt *JSRuntime) Close()
- func (rt *JSRuntime) Exec(code string) (jsErr *JSError)
- func (rt *JSRuntime) ExecAt(code string, dir string) (jsErr *JSError)
- func (rt *JSRuntime) ExecAtFile(code string, filename string) (jsErr *JSError)
- func (rt *JSRuntime) ExecFile(filename string) (jsErr *JSError)
- func (rt *JSRuntime) ExecPreCompiled(cc *PreCompiledCode) (jsErr *JSError)
- func (rt *JSRuntime) Run(code string) (out interface{}, jsErr *JSError)
- func (rt *JSRuntime) RunAt(code string, dir string) (out interface{}, jsErr *JSError)
- func (rt *JSRuntime) RunAtFile(code string, filename string) (out interface{}, jsErr *JSError)
- func (rt *JSRuntime) RunFile(filename string) (out interface{}, jsErr *JSError)
- func (rt *JSRuntime) RunPreCompiled(cc *PreCompiledCode) (out interface{}, jsErr *JSError)
- type PreCompiledCode
- type RequirePlugins
- type RuntimeOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadPluginsConfig ¶ added in v0.0.7
func LoadPluginsConfig(filename string)
func MakeAllPluginCode ¶ added in v0.0.4
func MakeAllPluginCode()
func MakeFromJsValue ¶
func MakeJsValue ¶
func MakeJsValueForPlugin ¶
func MakePluginCode ¶ added in v0.0.4
func SetPluginsConfig ¶ added in v0.0.2
Types ¶
type JSError ¶ added in v0.0.6
type JSError struct { Stack string // contains filtered or unexported fields }
func Run ¶
func Run(code string, option *RuntimeOption) (out interface{}, jsErr *JSError)
func RunAt ¶ added in v0.0.6
func RunAt(code, dir string, option *RuntimeOption) (out interface{}, jsErr *JSError)
func RunFile ¶ added in v0.0.4
func RunFile(filename string, option *RuntimeOption) (out interface{}, jsErr *JSError)
func RunPreCompiled ¶ added in v0.0.7
func RunPreCompiled(cc *PreCompiledCode, option *RuntimeOption) (out interface{}, jsErr *JSError)
type JSRuntime ¶ added in v0.0.2
type JSRuntime struct { JsCtx *quickjs.Context GoCtx *plugin.Context // contains filtered or unexported fields }
func New ¶ added in v0.0.2
func New(option *RuntimeOption) *JSRuntime
func (*JSRuntime) ExecAtFile ¶ added in v0.0.7
func (*JSRuntime) ExecPreCompiled ¶ added in v0.0.7
func (rt *JSRuntime) ExecPreCompiled(cc *PreCompiledCode) (jsErr *JSError)
func (*JSRuntime) RunPreCompiled ¶ added in v0.0.7
func (rt *JSRuntime) RunPreCompiled(cc *PreCompiledCode) (out interface{}, jsErr *JSError)
type PreCompiledCode ¶ added in v0.0.7
type PreCompiledCode struct { FixedCode string Plugins []RequirePlugins Filename string CodeLines map[string][]string RealCodeLines map[string][]string Imports map[string]string ImportedVar map[string]string }
func PreCompile ¶ added in v0.0.7
func PreCompile(code, filename string, logger *log.Logger) (*PreCompiledCode, error)
func PreCompileFile ¶ added in v0.0.7
func PreCompileFile(filename string, logger *log.Logger) (*PreCompiledCode, error)
type RequirePlugins ¶ added in v0.0.7
Click to show internal directories.
Click to hide internal directories.