Documentation ¶
Index ¶
- type AddOnManager
- func (m *AddOnManager) Apply(context *command.ExecutionContext) error
- func (m *AddOnManager) ApplyAddOn(addOn addon.AddOn, context *command.ExecutionContext) error
- func (m *AddOnManager) BaseDir() string
- func (m *AddOnManager) Disable(addonName string) (*addon.AddOnConfig, error)
- func (m *AddOnManager) Enable(addonName string, priority int) (*addon.AddOnConfig, error)
- func (m *AddOnManager) Get(name string) addon.AddOn
- func (m *AddOnManager) Install(source string, force bool) (string, error)
- func (m *AddOnManager) IsInstalled(name string) bool
- func (m *AddOnManager) List() []addon.AddOn
- func (m *AddOnManager) RemoveAddOn(addOn addon.AddOn, context *command.ExecutionContext) error
- func (m *AddOnManager) String() string
- func (m *AddOnManager) UnInstall(addonName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddOnManager ¶
type AddOnManager struct {
// contains filtered or unexported fields
}
AddOnManager is the central point for all operations around managing addons. An addon manager is created for the base directory of a addon collection.
func NewAddOnManager ¶
func NewAddOnManager(baseDir string, configMap map[string]*addon.AddOnConfig) (*AddOnManager, error)
NewAddOnManager creates a new addon manager for the specified addon directory.
func (*AddOnManager) Apply ¶
func (m *AddOnManager) Apply(context *command.ExecutionContext) error
Apply executes all enabled addons.
func (*AddOnManager) ApplyAddOn ¶ added in v1.1.0
func (m *AddOnManager) ApplyAddOn(addOn addon.AddOn, context *command.ExecutionContext) error
func (*AddOnManager) BaseDir ¶
func (m *AddOnManager) BaseDir() string
BaseDir returns the base directory against which this addon manager was initialised
func (*AddOnManager) Disable ¶
func (m *AddOnManager) Disable(addonName string) (*addon.AddOnConfig, error)
Disable disables the addon with the specified name.
func (*AddOnManager) Enable ¶
func (m *AddOnManager) Enable(addonName string, priority int) (*addon.AddOnConfig, error)
Enable enables the addon specified via addonName to be run during startup. The priority determines when the addon is run in relation the other addons.
func (*AddOnManager) Get ¶
func (m *AddOnManager) Get(name string) addon.AddOn
Get returns the addon with the specified name. nil is returned if there is no addon with this name.
func (*AddOnManager) Install ¶
func (m *AddOnManager) Install(source string, force bool) (string, error)
Install installs the addon provided via the source directory into the addon directory managed by this addon manager. It returns the name of the installed addon. In case an error occurs the empty string and an error are returned.
func (*AddOnManager) IsInstalled ¶
func (m *AddOnManager) IsInstalled(name string) bool
func (*AddOnManager) List ¶
func (m *AddOnManager) List() []addon.AddOn
List provides a list of addons managed by this manager
func (*AddOnManager) RemoveAddOn ¶ added in v1.6.0
func (m *AddOnManager) RemoveAddOn(addOn addon.AddOn, context *command.ExecutionContext) error
func (*AddOnManager) String ¶
func (m *AddOnManager) String() string
func (*AddOnManager) UnInstall ¶ added in v1.6.0
func (m *AddOnManager) UnInstall(addonName string) error
UnInstall uninstalls the addon specified via addonName.