plugins

package
v2.9.4 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2023 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	F_IMPORT_FROM_GO_OBJECT uint8 = 1 << iota
	F_IMPORT_FROM_MODULE
	F_IMPORT_FROM_INSTANCE
	F_IMPORT_FROM_GLOBAL
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	ExportPath   string              `js:"exportPath"`
	Exports      map[string]js.Value `js:"exports"`
	Module       js.Value            `js:"module"`
	Instance     js.Value            `js:"instance"`
	ExportObject js.Value            `js:"exportObject"`
	GoObject     js.Value            `js:"goObject"`
	Flags        uint8
}

func (*Plugin) Call

func (e *Plugin) Call(varName string, args ...any) (js.Value, error)

func (*Plugin) Get

func (e *Plugin) Get(varName string) (js.Value, error)

type Plugins

type Plugins map[string]*Plugin

func New added in v2.6.6

func New() Plugins

func (*Plugins) Call

func (e *Plugins) Call(pluginName, varName string, args ...any) (js.Value, error)

func (*Plugins) Get

func (e *Plugins) Get(pluginName, varName string) (js.Value, error)

func (*Plugins) NewPlugin added in v2.6.6

func (e *Plugins) NewPlugin(name, url, pathToExports string, flag uint8) (*Plugin, error)

Jump to

Keyboard shortcuts

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