Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultNamespace = "system"
View Source
const PluginType = "js"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Initializer ¶
type Initializer struct { Entry string StartCommand string DisableBuiltin bool Namespace string Modules []*herbplugin.Module }
func NewInitializer ¶
func NewInitializer() *Initializer
func (*Initializer) MustApplyInitializer ¶
func (i *Initializer) MustApplyInitializer(p *Plugin)
type JsPluginLoader ¶
type JsPluginLoader interface {
LoadJsPlugin() *Plugin
}
type Plugin ¶
type Plugin struct { sync.RWMutex Runtime *goja.Runtime herbplugin.Plugin DisableBuiltin bool Builtin map[string]func(call otto.FunctionCall) otto.Value // contains filtered or unexported fields }
func MustCreatePlugin ¶
func MustCreatePlugin(i *Initializer) *Plugin
func (*Plugin) LoadJsPlugin ¶
func (*Plugin) MustBootPlugin ¶
func (p *Plugin) MustBootPlugin()
func (*Plugin) MustClosePlugin ¶
func (p *Plugin) MustClosePlugin()
func (*Plugin) MustInitPlugin ¶
func (p *Plugin) MustInitPlugin()
func (*Plugin) MustLoadPlugin ¶
func (p *Plugin) MustLoadPlugin()
func (*Plugin) PluginType ¶
Click to show internal directories.
Click to hide internal directories.