specr

package
v0.0.0-...-f647b64 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2017 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SpecBuildTemplate = `` /* 943-byte string literal not displayed */
View Source
var SpecTemplate = `` /* 1702-byte string literal not displayed */

Functions

This section is empty.

Types

type Commands

type Commands struct {
	Pre      []string `ini:"pre,omitempty"`
	Post     []string `ini:"post,omitempty"`
	SkipPre  bool     `ini:"skip_pre"`
	SkipPost bool     `ini:"skip_post"`
	TailPre  bool     `ini:"tail_pre"`
	TailPost bool     `ini:"tail_post"`
}

type Configs

type Configs struct {
	DebianRoot      string `ini:"debian_root"`
	SkipInterpolate bool   `ini:"skip_interpolate"`
}

type Content

type Content struct {
	Source     string `ini:"source"`
	DebianRoot string `ini:"debian_root"`
}

type FileTransfer

type FileTransfer struct {
	Source      string
	Destination string
	Folder      string
	Chown       string
	Chmod       string
	Interpolate bool
}

FileTransfer Struct //////////////..........

type FileTransfers

type FileTransfers []FileTransfer

type LocalJob

type LocalJob struct {
	Class       string
	Sequence    string
	Locale      string
	Deltas      chan string
	Notices     chan string
	Responses   chan string
	Information chan string
	Errors      chan error
	SpecName    string
	SpecList    *SpecList
	WaitGroup   *sync.WaitGroup
}

Jobs that run locally

func (*LocalJob) Run

func (job *LocalJob) Run()

type Packages

type Packages struct {
	AptGet       []string `ini:"apt_get"`
	SkipPackages bool     `ini:"skip_packages"`
}

type Spec

type Spec struct {
	Version  string   `ini:"VERSION"`
	Requires []string `ini:"REQUIRES,omitempty"`
	Packages Packages `ini:"PACKAGES"`
	Configs  Configs  `ini:"CONFIGS"`
	Content  Content  `ini:"CONTENT"`
	Commands Commands `ini:"COMMANDS"`
	SpecFile string   `ini:"-"`
	SpecRoot string   `ini:"-"`
}

type SpecList

type SpecList struct {
	Specs map[string]*Spec
}

Spec Structs //////////////..........

func GetSpecs

func GetSpecs() (*SpecList, error)

Reads in all the specs and builds a SpecList

func (*SpecList) AptGetCmds

func (s *SpecList) AptGetCmds(specName string) (cmds []string)

Returns the apt-get commands for a given spec

func (*SpecList) DebianFileTransferList

func (s *SpecList) DebianFileTransferList(specName string) *FileTransfers

func (*SpecList) LocalConfigure

func (s *SpecList) LocalConfigure(specName, class, sequence, locale string)

Run Local configuration on this machine

func (*SpecList) PostCmds

func (s *SpecList) PostCmds(specName string) []string

Returns the post-configure commands

func (*SpecList) PreCmds

func (s *SpecList) PreCmds(specName string) []string

Returns the pre-configure commands

func (*SpecList) PrintSpecInformation

func (s *SpecList) PrintSpecInformation()

Prints table of all available specs in a table

func (*SpecList) Requires

func (s *SpecList) Requires(specName string) []string

Returns the requires

func (*SpecList) ShowSpecBuild

func (s *SpecList) ShowSpecBuild(specName string)

func (*SpecList) SpecExists

func (s *SpecList) SpecExists(spec string) bool

Checks if a given spec exists

type SpecSummary

type SpecSummary struct {
	Name      string
	Requires  []string
	PreCmds   []string
	AptCmds   []string
	Transfers *FileTransfers
	PostCmds  []string
}

Jump to

Keyboard shortcuts

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