Documentation
¶
Overview ¶
Each middleware provides an implementation slice, performing side effects and adapting the run based on provided arguments
Index ¶
- func LookUpPipelineDefinition(definitionsLookup pipeline.PipelineDefinitionsLookup, identifier string, ...) (*pipeline.PipelineDefinition, bool)
- func ParseArguments(middlewareArguments interface{}, middlewareIdentifier string, ...) bool
- func ParseArgumentsIncludingParents(middlewareArguments interface{}, middlewareIdentifier string, ...) bool
- type Arguments
- type ExecutionContext
- func (executionContext *ExecutionContext) Cancel() error
- func (executionContext *ExecutionContext) CancelAll() error
- func (executionContext *ExecutionContext) Execute(pipelineIdentifier string, writer io.Writer)
- func (executionContext *ExecutionContext) FullRun(options ...FullRunOption) *pipeline.Run
- func (executionContext *ExecutionContext) PipelineFileAtPath(path string) (*pipeline.File, error)
- func (executionContext *ExecutionContext) SetUpPipelines(args []string) error
- type ExecutionContextOption
- func WithActivityIndicator(activityIndicator logging.ActivityIndicator) ExecutionContextOption
- func WithDefinitionsLookup(definitions pipeline.PipelineDefinitionsLookup) ExecutionContextOption
- func WithExecutionFunction(executionFunction func(run *pipeline.Run)) ExecutionContextOption
- func WithLogger(logger *logrus.Logger) ExecutionContextOption
- func WithMiddlewareStack(stack []Middleware) ExecutionContextOption
- func WithParser(parser *parser.Parser) ExecutionContextOption
- func WithProjectPath(projectPath string) ExecutionContextOption
- func WithUserPromptImplementation(...) ExecutionContextOption
- type FullRunOption
- func WithArguments(arguments map[string]interface{}) FullRunOption
- func WithIdentifier(identifier *string) FullRunOption
- func WithLogWriter(logWriter io.WriteCloser) FullRunOption
- func WithParentRun(parentRun *pipeline.Run) FullRunOption
- func WithSetupFunc(preCallback func(*pipeline.Run)) FullRunOption
- func WithTearDownFunc(postCallback func(*pipeline.Run)) FullRunOption
- type FullRunOptions
- type Middleware
- type PipelineReference
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LookUpPipelineDefinition ¶
func LookUpPipelineDefinition(definitionsLookup pipeline.PipelineDefinitionsLookup, identifier string, rootFileName string) (*pipeline.PipelineDefinition, bool)
func ParseArguments ¶
Types ¶
type ExecutionContext ¶
type ExecutionContext struct {
PipelineFiles []pipeline.File
Definitions pipeline.PipelineDefinitionsLookup
MiddlewareStack []Middleware
Defaults pipeline.DefaultSettings
Hooks pipeline.HookDefinitions
Log *logrus.Logger
ProjectPath string
RootFileName string
SelectableFiles []string
Runs []*pipeline.Run
ActivityIndicator logging.ActivityIndicator
UserPromptImplementation func(
label string,
items []string,
initialSelection int,
size int,
input io.ReadCloser,
output io.WriteCloser,
) (int, string, error)
// contains filtered or unexported fields
}
func NewExecutionContext ¶
func NewExecutionContext(options ...ExecutionContextOption) *ExecutionContext
func (*ExecutionContext) Cancel ¶
func (executionContext *ExecutionContext) Cancel() error
func (*ExecutionContext) CancelAll ¶
func (executionContext *ExecutionContext) CancelAll() error
func (*ExecutionContext) Execute ¶
func (executionContext *ExecutionContext) Execute(pipelineIdentifier string, writer io.Writer)
func (*ExecutionContext) FullRun ¶
func (executionContext *ExecutionContext) FullRun(options ...FullRunOption) *pipeline.Run
func (*ExecutionContext) PipelineFileAtPath ¶
func (executionContext *ExecutionContext) PipelineFileAtPath(path string) (*pipeline.File, error)
func (*ExecutionContext) SetUpPipelines ¶
func (executionContext *ExecutionContext) SetUpPipelines(args []string) error
type ExecutionContextOption ¶
type ExecutionContextOption func(*ExecutionContext)
func WithActivityIndicator ¶
func WithActivityIndicator(activityIndicator logging.ActivityIndicator) ExecutionContextOption
func WithDefinitionsLookup ¶
func WithDefinitionsLookup(definitions pipeline.PipelineDefinitionsLookup) ExecutionContextOption
func WithExecutionFunction ¶
func WithExecutionFunction(executionFunction func(run *pipeline.Run)) ExecutionContextOption
func WithLogger ¶
func WithLogger(logger *logrus.Logger) ExecutionContextOption
func WithMiddlewareStack ¶
func WithMiddlewareStack(stack []Middleware) ExecutionContextOption
func WithParser ¶
func WithParser(parser *parser.Parser) ExecutionContextOption
func WithProjectPath ¶
func WithProjectPath(projectPath string) ExecutionContextOption
func WithUserPromptImplementation ¶
func WithUserPromptImplementation(implementation func( label string, items []string, initialSelection int, size int, input io.ReadCloser, output io.WriteCloser, ) (int, string, error)) ExecutionContextOption
type FullRunOption ¶
type FullRunOption func(*FullRunOptions)
func WithArguments ¶
func WithArguments(arguments map[string]interface{}) FullRunOption
func WithIdentifier ¶
func WithIdentifier(identifier *string) FullRunOption
func WithLogWriter ¶
func WithLogWriter(logWriter io.WriteCloser) FullRunOption
func WithParentRun ¶
func WithParentRun(parentRun *pipeline.Run) FullRunOption
func WithSetupFunc ¶
func WithSetupFunc(preCallback func(*pipeline.Run)) FullRunOption
func WithTearDownFunc ¶
func WithTearDownFunc(postCallback func(*pipeline.Run)) FullRunOption
type FullRunOptions ¶
type FullRunOptions struct {
// contains filtered or unexported fields
}
type Middleware ¶
type PipelineReference ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
The `catch` middleware enables graceful handling of stderr output
|
The `catch` middleware enables graceful handling of stderr output |
|
The `catchEach` middleware enables graceful handling of stderr output based on regex patterns
|
The `catchEach` middleware enables graceful handling of stderr output based on regex patterns |
|
The `dir` middleware allows for changing the current working directory
|
The `dir` middleware allows for changing the current working directory |
|
The `docker` middleware enables execution within a Docker (Compose) container
|
The `docker` middleware enables execution within a Docker (Compose) container |
|
The `each` middleware copies some input into several child pipes running simultaneously
|
The `each` middleware copies some input into several child pipes running simultaneously |
|
The `env` middleware manipulates environment variables
|
The `env` middleware manipulates environment variables |
|
The `inherit` middleware passes arguments from a parent to its children
|
The `inherit` middleware passes arguments from a parent to its children |
|
The `input` middleware overwrites a pipe's input directly
|
The `input` middleware overwrites a pipe's input directly |
|
The `interpolate` middleware substitutes arguments or inputs into other arguments
|
The `interpolate` middleware substitutes arguments or inputs into other arguments |
|
The `output` middleware overwrites a pipe's output directly
|
The `output` middleware overwrites a pipe's output directly |
|
The `pipe` middleware executes several commands in sequence
|
The `pipe` middleware executes several commands in sequence |
|
The `select` middleware shows selection prompts to the user
|
The `select` middleware shows selection prompts to the user |
|
The `shell` middleware executes commands in a shell
|
The `shell` middleware executes commands in a shell |
|
The `ssh` middleware enables remote command execution via SSH
|
The `ssh` middleware enables remote command execution via SSH |
|
Defines a list of middleware items to be executed when a pipeline is run
|
Defines a list of middleware items to be executed when a pipeline is run |
|
The `sync` middleware defers execution until a condition is fulfilled
|
The `sync` middleware defers execution until a condition is fulfilled |
|
The `timer` middleware records execution time
|
The `timer` middleware records execution time |
|
The `when` middleware enables conditional execution
|
The `when` middleware enables conditional execution |
|
The `with` middleware extracts and processes input patterns
|
The `with` middleware extracts and processes input patterns |
Click to show internal directories.
Click to hide internal directories.