Documentation ¶
Index ¶
- Constants
- func CartesianProduct(mapOfLists map[string][]interface{}) []map[string]interface{}
- func CloneIfRequired(refName plumbing.ReferenceName, input NewGitCloneExecutorInput, ...) (*git.Repository, error)
- func CopyDir(source string, dest string) (err error)
- func CopyFile(source string, dest string) (err error)
- func Dryrun(ctx context.Context) bool
- func FindGitRef(file string) (string, error)
- func FindGitRevision(file string) (shortSha string, sha string, err error)
- func FindGithubRepo(file string) (string, error)
- func Logger(ctx context.Context) logrus.FieldLogger
- func NewLineWriter(handlers ...LineHandler) io.Writer
- func WithDryrun(ctx context.Context, dryrun bool) context.Context
- func WithLogger(ctx context.Context, logger logrus.FieldLogger) context.Context
- type Conditional
- type Drawing
- type Executor
- func NewConditionalExecutor(conditional Conditional, trueExecutor Executor, falseExecutor Executor) Executor
- func NewDebugExecutor(format string, args ...interface{}) Executor
- func NewErrorExecutor(err error) Executor
- func NewGitCloneExecutor(input NewGitCloneExecutorInput) Executor
- func NewInfoExecutor(format string, args ...interface{}) Executor
- func NewParallelExecutor(executors ...Executor) Executor
- func NewPipelineExecutor(executors ...Executor) Executor
- func (e Executor) ChannelError(errChan chan error) Executor
- func (e Executor) Finally(finally Executor) Executor
- func (e Executor) If(conditional Conditional) Executor
- func (e Executor) IfBool(conditional bool) Executor
- func (e Executor) IfNot(conditional Conditional) Executor
- func (e Executor) Then(then Executor) Executor
- type LineHandler
- type NewGitCloneExecutorInput
- type Pen
- type Style
- type Warning
Constants ¶
const ( StyleDoubleLine = iota StyleSingleLine StyleDashedLine StyleNoLine )
Styles
Variables ¶
This section is empty.
Functions ¶
func CartesianProduct ¶
CartesianProduct takes map of lists and returns list of unique tuples
func CloneIfRequired ¶ added in v0.2.10
func CloneIfRequired(refName plumbing.ReferenceName, input NewGitCloneExecutorInput, logger log.FieldLogger) (*git.Repository, error)
func FindGitRevision ¶
FindGitRevision get the current git revision
func Logger ¶
func Logger(ctx context.Context) logrus.FieldLogger
Logger returns the appropriate logger for current context
func NewLineWriter ¶
func NewLineWriter(handlers ...LineHandler) io.Writer
NewLineWriter creates a new instance of a line writer
func WithDryrun ¶
WithDryrun adds a value to the context for dryrun
func WithLogger ¶
WithLogger adds a value to the context for the logger
Types ¶
type Conditional ¶
Conditional define contract for the conditional predicate
type Executor ¶
Executor define contract for the steps of a workflow
func NewConditionalExecutor ¶
func NewConditionalExecutor(conditional Conditional, trueExecutor Executor, falseExecutor Executor) Executor
NewConditionalExecutor creates a new executor based on conditions
func NewDebugExecutor ¶ added in v0.2.2
NewDebugExecutor is an executor that logs messages
func NewErrorExecutor ¶
NewErrorExecutor creates a new executor that always errors out
func NewGitCloneExecutor ¶
func NewGitCloneExecutor(input NewGitCloneExecutorInput) Executor
NewGitCloneExecutor creates an executor to clone git repos
func NewInfoExecutor ¶
NewInfoExecutor is an executor that logs messages
func NewParallelExecutor ¶
NewParallelExecutor creates a new executor from a parallel of other executors
func NewPipelineExecutor ¶
NewPipelineExecutor creates a new executor from a series of other executors
func (Executor) ChannelError ¶
ChannelError sends error to errChan rather than returning error
func (Executor) If ¶
func (e Executor) If(conditional Conditional) Executor
If only runs this executor if conditional is true
func (Executor) IfNot ¶
func (e Executor) IfNot(conditional Conditional) Executor
IfNot only runs this executor if conditional is true
type LineHandler ¶
LineHandler is a callback function for handling a line
type NewGitCloneExecutorInput ¶
NewGitCloneExecutorInput the input for the NewGitCloneExecutor