manager

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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 mananager 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) String

func (m *AddOnManager) String() string

Jump to

Keyboard shortcuts

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