Documentation ¶
Index ¶
- Constants
- Variables
- func HasCompleted(step idl.Step, substep idl.Substep) (bool, error)
- func HasRun(step idl.Step, substep idl.Substep) (bool, error)
- func HasStarted(step idl.Step) (bool, error)
- type BufferedStreams
- type LogStdStreams
- type OutStreams
- type PrettyStatus
- type Step
- type SubstepFileStore
- type SubstepStore
Constants ¶
const SubstepsFileName = "substeps.json"
Variables ¶
var DevNullStream = devNullStream{}
DevNullStream provides an implementation of OutStreams that drops all writes to it.
var Quit = userQuitErr{}
Quit indicates that the user has canceled and does not want to proceed.
var Skip = skipErr{}
Skip can be returned from a Run or AlwaysRun callback to immediately mark the substep complete on disk and report "skipped" to the UI.
var StdStreams = &stdStreams{}
StdStreams implements OutStreams that writes directly to stdout and stderr
Functions ¶
Types ¶
type BufferedStreams ¶
BufferedStreams provides an implementation of OutStreams that stores all writes to underlying bytes.Buffer objects.
func (*BufferedStreams) Stderr ¶
func (s *BufferedStreams) Stderr() io.Writer
func (*BufferedStreams) Stdout ¶
func (s *BufferedStreams) Stdout() io.Writer
type LogStdStreams ¶
type LogStdStreams struct {
// contains filtered or unexported fields
}
LogStdStreams is a type of OutStreams that writes to both a stdout/stderr and a log file. Writing to stdout/stderr will also write to the log file. When verbose is false the streams are "not" written to stdout/stderr to match the behavior of the Hub streams.
func NewLogStdStreams ¶
func NewLogStdStreams(verbose bool) *LogStdStreams
func (*LogStdStreams) Stderr ¶
func (s *LogStdStreams) Stderr() io.Writer
func (*LogStdStreams) Stdout ¶
func (s *LogStdStreams) Stdout() io.Writer
type PrettyStatus ¶
PrettyStatus exists only to write a string description of idl.Status to the JSON representation, instead of an integer.
func (PrettyStatus) MarshalText ¶
func (p PrettyStatus) MarshalText() ([]byte, error)
func (*PrettyStatus) UnmarshalText ¶
func (p *PrettyStatus) UnmarshalText(buf []byte) error
type Step ¶
type Step struct {
// contains filtered or unexported fields
}
func New ¶
func New(name idl.Step, sender idl.MessageSender, substepStore SubstepStore, streams OutStreams) *Step
func (*Step) RunConditionally ¶
func (*Step) Streams ¶
func (s *Step) Streams() OutStreams
type SubstepFileStore ¶
type SubstepFileStore struct {
// contains filtered or unexported fields
}
SubstepFileStore implements SubstepStore by providing persistent storage on disk.
func NewSubstepFileStore ¶
func NewSubstepFileStore() (*SubstepFileStore, error)
func NewSubstepStoreUsingFile ¶
func NewSubstepStoreUsingFile(path string) *SubstepFileStore
func (*SubstepFileStore) ReadStep ¶
func (f *SubstepFileStore) ReadStep(step idl.Step) (map[string]PrettyStatus, error)