plugins

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Destroy

func Destroy()

func Init

func Init(pl *log.Logger)

Types

type APIPlugin

type APIPlugin interface {
	Plugin
	// Separate router mounted on /
	Route(chi.Router)
}

type GetPluginFunc

type GetPluginFunc func() Plugin

type LoaderParams

type LoaderParams struct {
	Router chi.Router
}
var DefLoaderParams LoaderParams

type Plugin

type Plugin interface {
	Init(*log.Logger, PluginParams) error
	// Returns the D-Bus or Java–style name for the plugin
	DBusName() string
	// Function to close connections, end requests, etc.
	Destroy()
}

type PluginParams

type PluginParams struct {
	DB *bun.DB
}
var DefParams PluginParams

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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