Documentation ¶
Index ¶
- Constants
- type AddOn
- type AddOnConfig
- type AddOnMeta
- type ByPriority
- type ByStatusThenName
- type ByStatusThenPriorityThenName
- type DefaultAddOn
- func (a *DefaultAddOn) Commands() []command.Command
- func (a *DefaultAddOn) GetPriority() int
- func (a *DefaultAddOn) InstallPath() string
- func (a *DefaultAddOn) IsEnabled() bool
- func (a *DefaultAddOn) MetaData() AddOnMeta
- func (a *DefaultAddOn) MetaDataForAddonRemove() AddOnMeta
- func (a *DefaultAddOn) RemoveCommands() []command.Command
- func (a *DefaultAddOn) SetEnabled(enabled bool)
- func (a *DefaultAddOn) SetPriority(priority int)
- func (meta *DefaultAddOn) String() string
- type DefaultAddOnMeta
- func (meta *DefaultAddOnMeta) Description() []string
- func (meta *DefaultAddOnMeta) GetValue(key string) string
- func (meta *DefaultAddOnMeta) Name() string
- func (meta *DefaultAddOnMeta) OpenShiftVersion() string
- func (meta *DefaultAddOnMeta) RequiredVars() ([]string, error)
- func (meta *DefaultAddOnMeta) String() string
- func (meta *DefaultAddOnMeta) VarDefaults() ([]RequiredVar, error)
- type RequiredVar
Constants ¶
const ( NameMetaTagName = "Name" DescriptionMetaTagName = "Description" RequiredOpenShiftVersion = "OpenShift-Version" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddOn ¶
type AddOn interface { // MetaData returns the meta data of this addon. MetaData() AddOnMeta // MetaDataForAddonRemove returns the meta data for this addon when remove subcommand used. MetaDataForAddonRemove() AddOnMeta // Commands returns a Command slice of the commands this addon consists of. Commands() []command.Command // RemoveCommands returns a slice of the commands which are used to remove this addon. RemoveCommands() []command.Command // InstallPath returns the path under which the addon is installed. InstallPath() string // IsEnabled returns true, if this addon is currently enabled and getting applied as part of OpenShift // provisioning. Returns false, if this addon is not enabled. IsEnabled() bool // SetEnabled sets this addon as en- or disabled. SetEnabled(enabled bool) // GetPriority returns the priority of this add on in terms of the order in which it gets applied GetPriority() int // SetPriority sets the priority of this addon in terms of its installation order. Addons with lower priority // gets installed first SetPriority(priority int) }
AddOn is the internal representation of an AddOn including the addon metadata and the actual commands the Addon consists off.
type AddOnConfig ¶
type AddOnMeta ¶
type AddOnMeta interface { Name() string Description() []string RequiredVars() ([]string, error) VarDefaults() ([]RequiredVar, error) GetValue(key string) string OpenShiftVersion() string }
AddOnMeta defines a set of meta data for an AddOn. Name and Description are required. Others are optional.
func NewAddOnMeta ¶
type ByPriority ¶
type ByPriority []AddOn
ByPriority implements sort.Interface for []AddOn based on the Priority field.
func (ByPriority) Len ¶
func (a ByPriority) Len() int
func (ByPriority) Less ¶
func (a ByPriority) Less(i, j int) bool
func (ByPriority) Swap ¶
func (a ByPriority) Swap(i, j int)
type ByStatusThenName ¶
type ByStatusThenName []AddOn
ByStatusThenName implements sort.Interface for []AddOn based primarily on the addon enable state and secondarily on the addon name.
func (ByStatusThenName) Len ¶
func (a ByStatusThenName) Len() int
func (ByStatusThenName) Less ¶
func (a ByStatusThenName) Less(i, j int) bool
func (ByStatusThenName) Swap ¶
func (a ByStatusThenName) Swap(i, j int)
type ByStatusThenPriorityThenName ¶
type ByStatusThenPriorityThenName []AddOn
ByStatusThenPriority implements sort.Interface for []AddOn based primarily on the addon enable state and secondarily on the addon priority. Lastly the name is considered
func (ByStatusThenPriorityThenName) Len ¶
func (a ByStatusThenPriorityThenName) Len() int
func (ByStatusThenPriorityThenName) Less ¶
func (a ByStatusThenPriorityThenName) Less(i, j int) bool
func (ByStatusThenPriorityThenName) Swap ¶
func (a ByStatusThenPriorityThenName) Swap(i, j int)
type DefaultAddOn ¶
type DefaultAddOn struct { AddOn // contains filtered or unexported fields }
DefaultAddOn provides the default implementation of the AddOn interface
func (*DefaultAddOn) Commands ¶
func (a *DefaultAddOn) Commands() []command.Command
func (*DefaultAddOn) GetPriority ¶
func (a *DefaultAddOn) GetPriority() int
func (*DefaultAddOn) InstallPath ¶
func (a *DefaultAddOn) InstallPath() string
func (*DefaultAddOn) IsEnabled ¶
func (a *DefaultAddOn) IsEnabled() bool
func (*DefaultAddOn) MetaData ¶
func (a *DefaultAddOn) MetaData() AddOnMeta
func (*DefaultAddOn) MetaDataForAddonRemove ¶ added in v1.13.0
func (a *DefaultAddOn) MetaDataForAddonRemove() AddOnMeta
func (*DefaultAddOn) RemoveCommands ¶ added in v1.6.0
func (a *DefaultAddOn) RemoveCommands() []command.Command
func (*DefaultAddOn) SetEnabled ¶
func (a *DefaultAddOn) SetEnabled(enabled bool)
func (*DefaultAddOn) SetPriority ¶
func (a *DefaultAddOn) SetPriority(priority int)
func (*DefaultAddOn) String ¶
func (meta *DefaultAddOn) String() string
type DefaultAddOnMeta ¶
type DefaultAddOnMeta struct {
// contains filtered or unexported fields
}
func (*DefaultAddOnMeta) Description ¶
func (meta *DefaultAddOnMeta) Description() []string
func (*DefaultAddOnMeta) GetValue ¶
func (meta *DefaultAddOnMeta) GetValue(key string) string
func (*DefaultAddOnMeta) Name ¶
func (meta *DefaultAddOnMeta) Name() string
func (*DefaultAddOnMeta) OpenShiftVersion ¶ added in v1.8.0
func (meta *DefaultAddOnMeta) OpenShiftVersion() string
func (*DefaultAddOnMeta) RequiredVars ¶ added in v1.3.0
func (meta *DefaultAddOnMeta) RequiredVars() ([]string, error)
func (*DefaultAddOnMeta) String ¶
func (meta *DefaultAddOnMeta) String() string
func (*DefaultAddOnMeta) VarDefaults ¶ added in v1.9.0
func (meta *DefaultAddOnMeta) VarDefaults() ([]RequiredVar, error)