installer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2016 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DoTags, SkipTags []string

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 ReportFail

func ReportFail(msg string, err error)

func ReportPass

func ReportPass(msg string, err error)

func ReportUnknown

func ReportUnknown(msg string, err error)

func RestoreDoTags

func RestoreDoTags(doTags []string)

func SkipID

func SkipID(id string) 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
}

func NewCustom

func NewCustom(task genesis.Doer) *Custom

func (Custom) Do

func (custom Custom) Do() (bool, error)

func (Custom) ID

func (custom Custom) ID() string

func (Custom) Status

func (custom Custom) Status() (genesis.Status, error)

func (Custom) Undo

func (custom Custom) Undo() (bool, error)

type IfThen

type IfThen struct {
	If   genesis.Doer
	Then genesis.Doer
}

func (IfThen) Do

func (ifthen IfThen) Do() (bool, error)

func (IfThen) ID

func (ifthen IfThen) ID() string

func (IfThen) Status

func (ifthen IfThen) Status() (genesis.Status, error)

func (IfThen) Undo

func (ifthen IfThen) Undo() (bool, error)

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 New

func New() *Installer

New creates a new installer object.

func (*Installer) Add

func (inst *Installer) Add(task genesis.Doer)

func (*Installer) AddTask

func (inst *Installer) AddTask(module genesis.Module)

func (*Installer) CleanUp

func (inst *Installer) CleanUp()

CleanUp removes the temporary directory.

func (*Installer) Done

func (inst *Installer) Done()

Done finishes up the installer process.

func (*Installer) GatherFacts

func (inst *Installer) GatherFacts()

GatherFacts learns stuff about the target system.

func (*Installer) History

func (inst *Installer) History(dir string, cmd []string) error

type Section

type Section struct {
	Tasks []genesis.Doer
	Name  string
}

func NewGroup

func NewGroup() *Section

func NewSection

func NewSection(name string) *Section

func (*Section) Add

func (section *Section) Add(doer genesis.Doer)

func (*Section) AddTask

func (section *Section) AddTask(module genesis.Module)

func (Section) Do

func (section Section) Do() (bool, error)

func (Section) ID

func (section Section) ID() string

func (Section) Status

func (section Section) Status() (genesis.Status, error)

func (Section) Undo

func (section Section) Undo() (bool, error)

type Task

type Task struct {
	genesis.Module
}

func (Task) Do

func (task Task) Do() (bool, error)

func (Task) Status

func (task Task) Status() (genesis.Status, error)

func (Task) Undo

func (task Task) Undo() (bool, error)

Jump to

Keyboard shortcuts

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