plugins

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionCallback

type ActionCallback func(data interface{})

type Plugin

type Plugin interface {
	Name() string
	Init(config interface{}) error
	Execute(input interface{}) (interface{}, error)
}

type PluginManager

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

func NewPluginManager

func NewPluginManager() *PluginManager

func (*PluginManager) ExecutePlugin

func (pm *PluginManager) ExecutePlugin(name string, input interface{}) (interface{}, error)

Method to execute a specific plugin.

func (*PluginManager) HasPlugin

func (pm *PluginManager) HasPlugin(name string) bool

Method to check if a plugin is already loaded.

func (*PluginManager) LoadPlugin

func (pm *PluginManager) LoadPlugin(path string, config interface{}) error

Jump to

Keyboard shortcuts

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