Documentation ¶
Index ¶
- Variables
- func NewDefaultPlugin() crypto.EncrypterPlugin
- type PKCS7EncryptionPlugin
- type Plugin
- type PluginLoader
- func (l PluginLoader) LoadDirsPlugins(dirs []string) ([]Plugin, error)
- func (l PluginLoader) LoadEnvPlugins(key, fallback string) ([]Plugin, error)
- func (l PluginLoader) LoadOsPlugins() ([]Plugin, error)
- func (l PluginLoader) LoadPlugin(file string) (Plugin, error)
- func (l PluginLoader) LoadPlugins(dir string) ([]Plugin, error)
Constants ¶
This section is empty.
Variables ¶
var ( // LoadPath is an OS-specific list of directories to search for plugins LoadPath string // LoadEnv is the name of the environment variable to retrieve the LoadPath LoadEnv string )
Functions ¶
func NewDefaultPlugin ¶
func NewDefaultPlugin() crypto.EncrypterPlugin
Types ¶
type PKCS7EncryptionPlugin ¶
type PKCS7EncryptionPlugin struct {
*pkcs7.PKCS7Plugin `kong:"embed,group='encryption',prefix='pkcs7.'"`
}
PKCS7EncryptionPlugin is a CLI argument container
func (*PKCS7EncryptionPlugin) Encrypter ¶
func (b *PKCS7EncryptionPlugin) Encrypter() string
func (*PKCS7EncryptionPlugin) NewEncrypter ¶
func (b *PKCS7EncryptionPlugin) NewEncrypter(configDir string) (crypto.Encrypter, error)
type Plugin ¶
type Plugin struct { crypto.EncrypterPlugin `kong:"embed,group='encryption',prefix='plugin.'"` // contains filtered or unexported fields }
Plugin is a crypto.EncrypterPlugin implementation using an dynamically loaded implementation.
type PluginLoader ¶
type PluginLoader string
PluginLoader is a wrapper around the golang plugin system to create crypto.EncrypterPlugin instances
func (PluginLoader) LoadDirsPlugins ¶
func (l PluginLoader) LoadDirsPlugins(dirs []string) ([]Plugin, error)
LoadDirsPlugins searches for plugins in the given directories
func (PluginLoader) LoadEnvPlugins ¶
func (l PluginLoader) LoadEnvPlugins(key, fallback string) ([]Plugin, error)
LoadEnvPlugins searches for plugins in locations designated by the given environment variable. The value is expected to be a list of directories. The item delimiter is OS-specific (os.PathListSeparator)
func (PluginLoader) LoadOsPlugins ¶
func (l PluginLoader) LoadOsPlugins() ([]Plugin, error)
LoadOsPlugins searches for plugins in OS-specific locations
func (PluginLoader) LoadPlugin ¶
func (l PluginLoader) LoadPlugin(file string) (Plugin, error)
LoadPlugin uses the golang plugin system to create a Plugin instance.
func (PluginLoader) LoadPlugins ¶
func (l PluginLoader) LoadPlugins(dir string) ([]Plugin, error)
LoadPlugins searches for plugins in the given directory