plugin

package
v0.0.0-...-27fe9b7 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: MIT Imports: 5 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 {
	//The javascript vm
	VM *otto.Otto
	//For errors and shit atm
	Logger logger.Logger
	//map of the said plugins loaded
	Plugins map[string]Plugin
}

func NewManager

func NewManager(log logger.Logger) *Manager

func (*Manager) LoadPlugin

func (m *Manager) LoadPlugin(plugin Plugin) error

func (*Manager) LoadPluginDir

func (m *Manager) LoadPluginDir()

type Plugin

type Plugin struct {
	//The name of the plugin it self
	Name string
	//The name of the authors of the plugin
	Authors []string
	//The api version this plugin should run on...
	Api string
	//The time in load order when this plugin should be loaded `STARTUP` or “
	Load string
	//Path to main js file to be ran as a start up script almost
	Main string
	//A two option thing with `objective` amd `script`
	Type string
	//The version of the plugin
	Version string
}

Jump to

Keyboard shortcuts

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