Documentation
¶
Index ¶
- func PluginTypeName(pluginType PluginType) string
- func PopulateCmdlineOptions(fs *flag.FlagSet) error
- func ProcessConfig(pluginConfig map[string]map[string]map[any]any) error
- func ProcessEnvVars() error
- func Register(pluginEntry PluginEntry)
- type Logger
- type Plugin
- type PluginEntry
- type PluginOption
- type PluginOptionType
- type PluginType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PluginTypeName ¶
func PluginTypeName(pluginType PluginType) string
func PopulateCmdlineOptions ¶
func ProcessEnvVars ¶
func ProcessEnvVars() error
func Register ¶
func Register(pluginEntry PluginEntry)
Types ¶
type Logger ¶
type Logger interface { Info(string, ...any) Warn(string, ...any) Debug(string, ...any) Error(string, ...any) }
Logger provides a logging interface for plugins.
type PluginEntry ¶
type PluginEntry struct { Type PluginType Name string Description string Options []PluginOption NewFromOptionsFunc func() Plugin }
func GetPlugins ¶
func GetPlugins(pluginType PluginType) []PluginEntry
type PluginOption ¶
type PluginOption struct { Name string Type PluginOptionType CustomEnvVar string CustomFlag string Description string DefaultValue any Dest any }
func (*PluginOption) AddToFlagSet ¶
func (*PluginOption) ProcessConfig ¶
func (p *PluginOption) ProcessConfig( pluginData map[any]any, ) error
func (*PluginOption) ProcessEnvVars ¶
func (p *PluginOption) ProcessEnvVars(envPrefix string) error
type PluginOptionType ¶
type PluginOptionType int
const ( PluginOptionTypeString PluginOptionType = 1 PluginOptionTypeBool PluginOptionType = 2 PluginOptionTypeInt PluginOptionType = 3 PluginOptionTypeUint PluginOptionType = 4 )
type PluginType ¶
type PluginType int
const ( PluginTypeMetadata PluginType = 1 PluginTypeBlob PluginType = 2 )
Click to show internal directories.
Click to hide internal directories.