Documentation ¶
Overview ¶
Currently this package only contains the definitions for various plugin types. It is planned to contain a plugin manager interface and an implementation of one to make simple "startup scripts" listing plugins.
For documentation of plugin types, see the package pkg.bitpond.org/hub/internal/types
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Version string
Functions ¶
This section is empty.
Types ¶
type CrossPlugin ¶
type CrossPlugin = types.CrossPlugin
A plugin that extends another plugin, or just has access to the plugin map.
type DatabasePlugin ¶
type DatabasePlugin = types.DatabasePlugin
A plugin with managed file-based SQL migrations. Migrations() returns a map of Unix timestamps to Go migrations. Any migrations since the last are each executed until one throws an error. On error, Destroy() is called, the database is restored, and an error is logged.
type Manager ¶
type Manager interface { // On error, returns the index of the plugin erroring and the error // received, or “(-1, nil)“ if all plugins initialized successfully. AddPlugins(...Plugin) (int, error) AddPluginFile(filename string) error GetPluginMap() map[string]Plugin // Finishishes initializing each plugin, specifically by passing the // plugin map to CrossPlugins. Finalize() // Starts listening. If the Server pointer is nil, Listen will use the // implementation default. Listen will not modify a passed Server // except for the Handler. Listen(*http.Server) // Shuts down the “http.Server“ in Listen() and calls Destroy() on // each plugin. Returns any error in shutting down, for instance from // “http.Server.Shutdown()“. Shutdown() error }
type Plugin ¶
A plugin.
There is an example plugin in the package pkg.bitpond.org/hub/plugins/example which simply registers the endpoint `/api/example-plugin` which returns the string "Hello, world!"
type PluginParams ¶
type PluginParams = types.PluginParams
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
exp
|
|
resource
Package resource provides an alternate method of acquiring resources.
|
Package resource provides an alternate method of acquiring resources. |
internal
|
|
This package contains useful middleware functions.
|
This package contains useful middleware functions. |
The `models` module provides core database types like User.
|
The `models` module provides core database types like User. |
plugins
|
|
auth_oidc
Use pkg.bitpond.org/hub/plugins/auth_oidc/import in launch script
|
Use pkg.bitpond.org/hub/plugins/auth_oidc/import in launch script |
auth_oidc/import
(Incomplete) Plugin auth_oidc adds support for OpenID Connect Discovery and authentication.
|
(Incomplete) Plugin auth_oidc adds support for OpenID Connect Discovery and authentication. |
auth_userpass
Use pkg.bitpond.org/hub/plugins/auth_userpass/import in launch script
|
Use pkg.bitpond.org/hub/plugins/auth_userpass/import in launch script |
auth_userpass/import
This plugin adds support for logging in with username, password, and extensible other factors.
|
This plugin adds support for logging in with username, password, and extensible other factors. |
avatar
Use pkg.bitpond.org/hub/plugins/avatar/import in launch script
|
Use pkg.bitpond.org/hub/plugins/avatar/import in launch script |
avatar/import
This plugin allows viewing and uploading user avatars.
|
This plugin allows viewing and uploading user avatars. |
core
Use pkg.bitpond.org/hub/plugins/core/import in launch script
|
Use pkg.bitpond.org/hub/plugins/core/import in launch script |
example
Use pkg.bitpond.org/hub/plugins/example/import in launch script
|
Use pkg.bitpond.org/hub/plugins/example/import in launch script |