Help us shape the future of Go! Take the 2026 Go Developer Survey

manager

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(p persona.Persona) ([]error, error)

Generate execute all initialized plugins implementing the Generator interface.

func LoadCommands

func LoadCommands() []*cobra.Command

LoadCommands load cobra commands from plugin implementing the Commander interface. NOTE that these commands will be available independently from the enablement status of the plugin.

func LoadCorePlugins

func LoadCorePlugins(config *viper.Viper) ([]error, error)

LoadCorePlugins instantiate and register all core plugins, configuring them using the values from the provided configuration file.

func LoadOptionalPlugins

func LoadOptionalPlugins(config *viper.Viper) ([]error, error)

LoadOptionalPlugins instantiate and register all optional plugins, configuring them using the values from the provided configuration file.

func LoadPlugins

func LoadPlugins(config *viper.Viper) ([]error, error)

LoadPlugins load all core plugins and all plugins enabled in the read configurationf file.

func SetupPlugins

func SetupPlugins(p persona.Persona) ([]error, error)

SetupPlugins perform setup for all initialized plugins implementing Setuppable interface.

func ShellLoader

func ShellLoader(p persona.Persona) (string, error)

ShellLoader generate profile shell loader file.

Types

type Plugin

type Plugin struct {
	Instance plugin.Pluggable
	Enabled  bool
}

Plugins is a managed plugin instance with information about it's enabled or disabled state.

func GetPlugin

func GetPlugin(name string) (Plugin, bool)

GetPlugin find a plugin by name and return it. Boolean value varies if the plugin is found in the plugins list or not.

Jump to

Keyboard shortcuts

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