Documentation ¶
Index ¶
- Constants
- func ExecuteCommand(stdin string, command string, args []string) (exitCode int, output string, error string)
- func ExecuteOp(op *Block)
- func PanicIfErr(e error)
- func PanicMsg(msg string)
- func WarnMsg(msg string)
- type Block
- type Config
- type Parser
- func (p *Parser) AppendConfigToExpanded(configpath string)
- func (p *Parser) ExpandConfigs()
- func (p *Parser) GetConfigContents(path string) string
- func (p *Parser) GetFileContents(filepath string) string
- func (p *Parser) GetUrlContents(url string) string
- func (p *Parser) ParseConfig(body string)
- func (p *Parser) ParseConfigReader(body io.Reader)
- func (p *Parser) ParseFilepath(filepath string)
- func (p *Parser) StartBlock(linebytes []byte)
- func (p *Parser) StoreBlock()
- type Runner
- type Scanner
Constants ¶
View Source
const ( TopLevel int = iota DefiningBlock DefiningScript DefiningStdin DefiningVar )
Variables ¶
This section is empty.
Functions ¶
func ExecuteCommand ¶
func PanicIfErr ¶
func PanicIfErr(e error)
Types ¶
type Block ¶
type Block struct { Touched bool `json:"-"` Label string `json:"label"` OpCounter uint `json:"opCounter"` Command string `json:"command"` CommandPath string `json:"commandPath"` Args []string `json:"args"` Stdin string `json:"stdin"` Success bool `json:"success"` ExitCode int `json:"exitCode"` HaltIfFail bool `json:"haltIfFail"` StartTime time.Time `json:"startTime"` EndTime time.Time `json:"endTime"` ElapsedTime time.Duration `json:"-"` RunError string `json:"runError"` StdouterrIsEmpty bool `json:"outputIsEmpty"` Stdouterr string `json:"-"` StdouterrFile string `json:"outputFile"` }
func (*Block) MarshalJSON ¶
type Config ¶
type Config struct { StateDir string ConfigFiles []string ConfigExpanded string Blocks []*Block Status map[string]string PrintVerboseResult bool PrintDebug bool NukeStateDirAtStart bool Parser *Parser Scanner *Scanner }
func (*Config) AddCmdBlock ¶
func (*Config) GetStatusKey ¶
func (*Config) OrderedOps ¶
func (*Config) SetStatusKey ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) AppendConfigToExpanded ¶
func (*Parser) ExpandConfigs ¶
func (p *Parser) ExpandConfigs()
func (*Parser) GetConfigContents ¶
func (*Parser) GetFileContents ¶
func (*Parser) GetUrlContents ¶
func (*Parser) ParseConfig ¶
func (*Parser) ParseConfigReader ¶
This is an intentionally hacky, hard-coded parser. Replace as codebase and syntax stabilizes.
func (*Parser) ParseFilepath ¶
func (*Parser) StartBlock ¶
func (*Parser) StoreBlock ¶
func (p *Parser) StoreBlock()
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
func NewScanner ¶
func (*Scanner) ScanEtcIssue ¶
func (s *Scanner) ScanEtcIssue()
func (*Scanner) UpdateStatus ¶
Click to show internal directories.
Click to hide internal directories.