Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Phase ¶
type Phase struct {
// Name is the name of the phase
Name string
// Aliases are alternative names for the phase
Aliases []string
// Description is the description of the phase
Description string
// PreRun is the function to run before the phase
PreRun func(data RunData) error
// Run is the function to run the phase
Run func(ctx context.Context, data RunData) error
// Flags is the list of flags to add to the command
// when it is run as an individual phase
Flags []string
}
Phase is a single phase of the workflow.
type Runner ¶
type Runner interface {
// AppendPhases adds a number of phases to the list of phases to run
AppendPhases(phases ...Phase)
// AppendSkipPhases adds a number of phases to the list of phases to skip
AppendSkipPhases(phases ...Phase)
// IsPhaseActive returns true if the phase is active
IsPhaseActive(phase Phase) bool
// BindToCommand alters the command's help text and flags to include the phase's flags
BindToCommand(cmd *cobra.Command, data RunData)
// Run runs the phases except the ones specified in skipPhases
Run(data RunData) error
}
Runner is the interface for running phases
Click to show internal directories.
Click to hide internal directories.