plugin

package
v0.0.0-...-d6825e6 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	Name     string
	IsActive bool
	Path     string
	State    *lua.LState
	Engine   *PluginEngine
	Actions  map[string]*lua.LFunction
	Aliases  map[string]*lua.LFunction
	Events   map[PluginEvent]*lua.LFunction
}

func NewPlugin

func NewPlugin(name string, path string, engine *PluginEngine) *Plugin

func (*Plugin) CheckAndExecuteAction

func (p *Plugin) CheckAndExecuteAction(text string) bool

func (*Plugin) CheckAndExecuteAlias

func (p *Plugin) CheckAndExecuteAlias(cmd string) bool

func (*Plugin) Load

func (p *Plugin) Load() error

type PluginEngine

type PluginEngine struct {
	// contains filtered or unexported fields
}

func NewPluginEngine

func NewPluginEngine(logger util.Logger, conf *config.Config) *PluginEngine

func (*PluginEngine) EnqueueCommand

func (pe *PluginEngine) EnqueueCommand(cmd string)

func (*PluginEngine) EnqueueText

func (pe *PluginEngine) EnqueueText(text string)

func (*PluginEngine) GetPlugins

func (pe *PluginEngine) GetPlugins() []*Plugin

func (*PluginEngine) ReceiveCommands

func (pe *PluginEngine) ReceiveCommands() chan string

func (*PluginEngine) ReceiveProcessedCommands

func (pe *PluginEngine) ReceiveProcessedCommands() chan string

func (*PluginEngine) ReceiveTextLines

func (pe *PluginEngine) ReceiveTextLines() chan types.BufferOutput

func (*PluginEngine) Start

func (pe *PluginEngine) Start()

type PluginEvent

type PluginEvent int
const (
	ProxyConnectEvent PluginEvent = iota
	ProxyDisconnectEvent
)

Jump to

Keyboard shortcuts

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