plugin

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2025 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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