plugins

package
v0.0.0-...-19bbfc4 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Manager contains plugin collection and add utility and concurrent protection for executing

func NewManager

func NewManager() *Manager

NewManager retrieves pointer to only single instance plugin manager

func (*Manager) Load

func (m *Manager) Load() error

Load finds all plugins in provided directory and loads then into manager

func (*Manager) Plugins

func (m *Manager) Plugins() *[]Plugin

func (*Manager) RecievePlugins

func (m *Manager) RecievePlugins(pluginReciever chan Plugin)

func (*Manager) Unload

func (m *Manager) Unload()

type Plugin

type Plugin struct {
	VM       *otto.Otto
	Document *goquery.Document
	// contains filtered or unexported fields
}

func (*Plugin) Call

func (p *Plugin) Call(funcName string, this interface{}, argumentList ...interface{}) (otto.Value, error)

func (*Plugin) Error

func (p *Plugin) Error(err error)

func (*Plugin) ParseFile

func (p *Plugin) ParseFile() error

func (*Plugin) UUID

func (p *Plugin) UUID() string

Jump to

Keyboard shortcuts

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