pluginsystem

package
Version: v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginSystem

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

PluginSystem loads and stores all available plugins and provides methods to retrieve the needed plugins

func NewPluginSystem

func NewPluginSystem(logger *logs.Logger, config *config.Reader) *PluginSystem

NewPluginSystem will instantiate a PluginSystem

func (*PluginSystem) GetAllAccounter

func (pluginSystem *PluginSystem) GetAllAccounter() (map[string]plugins.Accounter, error)

GetAllAccounter returns all plugins of type Accounter

func (*PluginSystem) GetAllAuthenticater

func (pluginSystem *PluginSystem) GetAllAuthenticater() (map[string]plugins.Authenticater, error)

GetAllAuthenticater returns all plugins of type Authenticater

func (*PluginSystem) GetAllDatastorer

func (pluginSystem *PluginSystem) GetAllDatastorer() (map[string]plugins.Datastorer, error)

GetAllDatastorer returns all plugins of type Datastorer

func (*PluginSystem) GetAllPoolContacter

func (pluginSystem *PluginSystem) GetAllPoolContacter() (map[string]plugins.PoolContacter, error)

GetAllPoolContacter returns all plugins of type PoolContacter

func (*PluginSystem) GetAllRadiusHandler

func (pluginSystem *PluginSystem) GetAllRadiusHandler() (map[string]plugins.RadiusHandler, error)

GetAllRadiusHandler returns all plugins of type RadiusHandler

func (*PluginSystem) GetByName

func (pluginSystem *PluginSystem) GetByName(name string) (plugins.Plugin, error)

GetByName returns the plugin with the specified name

func (*PluginSystem) GetByType

func (pluginSystem *PluginSystem) GetByType(pluginType plugins.PluginType) (map[string]plugins.Plugin, error)

GetByType returns all plugins of the specified type

func (*PluginSystem) LoadPlugins

func (pluginSystem *PluginSystem) LoadPlugins(pluginDir string) ([]plugins.Plugin, error)

LoadPlugins loads all plugins located in the pluginDir and returns them as an unsorted slice

func (*PluginSystem) Select

func (pluginSystem *PluginSystem) Select(pluginType plugins.PluginType, name string) error

Select the plugin to be used as a specific type when multiple would be available

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL