modules

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2016 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package modules provides some installer modules for the genesis package. But modules can reside anywhere, as long as they implement the genesis.Module interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Apt

type Apt struct {
	Name   string
	Absent bool
}

func (Apt) Describe

func (apt Apt) Describe() string

func (Apt) ID

func (apt Apt) ID() string

func (Apt) Install

func (apt Apt) Install() (string, error)

func (Apt) Remove

func (apt Apt) Remove() (string, error)

func (Apt) Status

func (apt Apt) Status() (genesis.Status, string, error)

type BlockInFile

type BlockInFile struct {
	File     string
	Patterns []string
	Lines    []string
	Success  []string
	Store    *store.Store
	Label    string
}

func (BlockInFile) Describe

func (bif BlockInFile) Describe() string

func (BlockInFile) ID

func (bif BlockInFile) ID() string

func (BlockInFile) Install

func (bif BlockInFile) Install() (string, error)

func (BlockInFile) Remove

func (bif BlockInFile) Remove() (string, error)

func (BlockInFile) Status

func (bif BlockInFile) Status() (genesis.Status, string, error)

type Command

type Command struct {
	Cmd          string
	Opts         []string
	PSPattern    string
	IgnoreErrors bool
	Timeout      time.Duration
}

func MakeCommand

func MakeCommand(cmd string, opts ...string) Command

func (Command) Describe

func (cmd Command) Describe() string

func (Command) ID

func (cmd Command) ID() string

func (Command) Install

func (cmd Command) Install() (string, error)

func (Command) Remove

func (cmd Command) Remove() (string, error)

func (Command) Status

func (cmd Command) Status() (genesis.Status, string, error)

type CopyFile

type CopyFile struct {
	Dest  string
	Src   string
	Store *store.Store
}

func (CopyFile) Describe

func (cpf CopyFile) Describe() string

func (CopyFile) ID

func (cpf CopyFile) ID() string

func (CopyFile) Install

func (cpf CopyFile) Install() (string, error)

func (CopyFile) Remove

func (cpf CopyFile) Remove() (string, error)

func (CopyFile) Status

func (cpf CopyFile) Status() (genesis.Status, string, error)

type Dpkg

type Dpkg struct {
	Path   string
	Name   string
	Force  bool
	Absent bool
}

func (Dpkg) Describe

func (dpkg Dpkg) Describe() string

func (Dpkg) ID

func (dpkg Dpkg) ID() string

func (Dpkg) Install

func (dpkg Dpkg) Install() (string, error)

func (Dpkg) Remove

func (dpkg Dpkg) Remove() (string, error)

func (Dpkg) Status

func (dpkg Dpkg) Status() (genesis.Status, string, error)

type File

type File struct {
	Path   string
	Mode   os.FileMode
	Owner  string
	Absent bool
	Local  bool // Don't follow links
}

func (File) Describe

func (file File) Describe() string

func (File) ID

func (file File) ID() string

func (File) Install

func (file File) Install() (string, error)

func (File) Remove

func (file File) Remove() (string, error)

func (File) Status

func (file File) Status() (genesis.Status, string, error)

type HttpGet

type HttpGet struct {
	Dest  string
	Url   string
	Store *store.Store
}

func (HttpGet) Describe

func (get HttpGet) Describe() string

func (HttpGet) ID

func (get HttpGet) ID() string

func (HttpGet) Install

func (get HttpGet) Install() (string, error)

func (HttpGet) Remove

func (get HttpGet) Remove() (string, error)

func (HttpGet) Status

func (get HttpGet) Status() (genesis.Status, string, error)

type Initd

type Initd struct {
	Name string
}

func (Initd) Describe

func (initd Initd) Describe() string

func (Initd) ID

func (initd Initd) ID() string

func (Initd) Install

func (initd Initd) Install() (string, error)

func (Initd) Remove

func (initd Initd) Remove() (string, error)

func (Initd) Status

func (initd Initd) Status() (genesis.Status, string, error)

type LineInFile

type LineInFile struct {
	File    string
	Pattern string
	Success string
	Line    string
	Store   *store.Store
	Label   string
	Before  string
	After   string
	Absent  bool
}

func (LineInFile) Describe

func (lif LineInFile) Describe() string

func (LineInFile) ID

func (lif LineInFile) ID() string

func (LineInFile) Install

func (lif LineInFile) Install() (string, error)

func (LineInFile) Remove

func (lif LineInFile) Remove() (string, error)

func (LineInFile) Status

func (lif LineInFile) Status() (genesis.Status, string, error)

type Mkdir

type Mkdir struct {
	Path   string
	Absent bool
	Empty  bool
}

func (Mkdir) Describe

func (mkdir Mkdir) Describe() string

func (Mkdir) ID

func (mkdir Mkdir) ID() string

func (Mkdir) Install

func (mkdir Mkdir) Install() (string, error)

func (Mkdir) Remove

func (mkdir Mkdir) Remove() (string, error)

func (Mkdir) Status

func (mkdir Mkdir) Status() (genesis.Status, string, error)

type Skeleton added in v0.1.1

type Skeleton struct {
	Foo string
}

Skeleton can be any type of object. Commonly it is a struct, but it doesn't have to be.

func (Skeleton) Describe added in v0.1.1

func (sk Skeleton) Describe() string

Describe returns a human-readable description.

func (Skeleton) ID added in v0.1.1

func (sk Skeleton) ID() string

ID returns a deterministic, unique string for the module.

func (Skeleton) Install added in v0.1.1

func (sk Skeleton) Install() (string, error)

Install performs an action, and reports on its success.

func (Skeleton) Remove added in v0.1.1

func (sk Skeleton) Remove() (string, error)

Remove reverses the Install action.

func (Skeleton) Status added in v0.1.1

func (sk Skeleton) Status() (genesis.Status, string, error)

Status reports on the current state of the system (does the install command need to run or not)>

type Template

type Template struct {
	DestFile     string
	TemplateFile string
	Vars         interface{}
	Store        *store.Store
}

func (Template) Describe

func (tmpl Template) Describe() string

func (Template) ID

func (tmpl Template) ID() string

func (Template) Install

func (tmpl Template) Install() (string, error)

func (Template) Remove

func (tmpl Template) Remove() (string, error)

func (Template) Status

func (tmpl Template) Status() (genesis.Status, string, error)

type User

type User struct {
	Name, Passwd string
}

func (User) Describe

func (u User) Describe() string

func (User) ID

func (u User) ID() string

func (User) Install

func (u User) Install() (string, error)

func (User) Remove

func (u User) Remove() (string, error)

func (User) Status

func (u User) Status() (genesis.Status, string, error)

Jump to

Keyboard shortcuts

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