Documentation
¶
Overview ¶
Package installer is the installer for the genesis package. It handles file backup, manages history, reports on progress, and invents higher-order tasks (such as if-then tasks)>
Index ¶
- Variables
- func EmptyDoTags() []string
- func PrintHeader(tag, desc string)
- func PrintSectionFooter(name string)
- func PrintSectionHeader(name string)
- func ReportDone(msg string, err error)
- func ReportFail(msg string, err error)
- func ReportPass(msg string, err error)
- func ReportSummary()
- func ReportUnknown(msg string, err error)
- func RestoreDoTags(doTags []string)
- func SkipID(id string) string
- type Custom
- type IfThen
- type Installer
- type Section
- type Task
Constants ¶
This section is empty.
Variables ¶
var DoTags, SkipTags []string
var StatusCount struct { Pass, Fail, Unknown, Done int }
Functions ¶
func EmptyDoTags ¶
func EmptyDoTags() []string
func PrintHeader ¶
func PrintHeader(tag, desc string)
func PrintSectionFooter ¶
func PrintSectionFooter(name string)
func PrintSectionHeader ¶
func PrintSectionHeader(name string)
func ReportDone ¶ added in v0.1.1
func ReportFail ¶
func ReportPass ¶
func ReportSummary ¶ added in v0.1.1
func ReportSummary()
func ReportUnknown ¶
func RestoreDoTags ¶
func RestoreDoTags(doTags []string)
Types ¶
type Custom ¶
type Custom struct {
Task genesis.Doer
S func() (genesis.Status, error)
D func() (bool, error)
U func() (bool, error)
I func() string
}
Custom is a type of genesis.Doer. It is a wrapper around another Doer which allows for custom Status/Do/Undo functions.
type IfThen ¶
IfThen is a type of genesis.Doer. It runs doer B if and only if doer A runs.
type Installer ¶
type Installer struct {
Status bool
Remove bool
Install bool
Verbose bool
Facts genesis.Facts
Dir string
Store *store.Store
Tasks []genesis.Doer
}
Installer is a wrapper around modules to provide a nice interface for building an installer.
func (*Installer) CleanUp ¶
func (inst *Installer) CleanUp()
CleanUp removes the temporary directory.
func (*Installer) GatherFacts ¶
func (inst *Installer) GatherFacts()
GatherFacts learns stuff about the target system.
type Section ¶
Section is a type of genesis.Doer. It groups Doers together with a label. It is useful for two reasons: 1) it allows for pretty labels in the output, and 2) it can group tasks together into a Doer that can be used as part of other Doers.