plugin

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppInterface

type AppInterface interface {
	GetConfig() interface{}
	GetDB() interface{}
	GetAuth() interface{}
	GetQueue() interface{}
	GetMailer() interface{}
	RegisterController(controller interface{})
}

type Config

type Config struct {
	Enabled  bool                   `json:"enabled"`
	Settings map[string]interface{} `json:"settings"`
}

type Manager

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

func NewManager

func NewManager(app AppInterface, pluginDir string) *Manager

func (*Manager) GetPlugin

func (m *Manager) GetPlugin(name string) (Plugin, bool)

func (*Manager) LoadPlugins

func (m *Manager) LoadPlugins() error

func (*Manager) UnloadPlugins

func (m *Manager) UnloadPlugins() error

type Plugin

type Plugin interface {
	Name() string
	Description() string
	Version() string
	Init(app AppInterface) error
	Shutdown() error
}

Jump to

Keyboard shortcuts

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