Documentation
¶
Overview ¶
Package pipeline Package middleware define middlewares for Actions.
Package pipeline Package pipes provides generic errors for pipes to use.
Package pipeline Package skip can skip an entire Action.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
type Action func(ctx context.ApplicationContext) error
Action is a function that takes a context and returns an error. It is used on Pipers, Defaulters and Publishers, although they are not aware of this generalization.
type ErrSkip ¶
type ErrSkip struct {
// contains filtered or unexported fields
}
ErrSkip occurs when a pipe is skipped for some reason.
type Pipelines ¶
type Pipelines interface { Execute() (context.ApplicationContext, error) Register(pipe ...Piper) // contains filtered or unexported methods }
func NewPipelines ¶
func NewPipelines(ctx context.ApplicationContext) Pipelines
type Piper ¶
type Piper interface { fmt.Stringer Run(ctx context.ApplicationContext) error }
Piper defines a pipes, which can be part of a pipeline (a series of pipes).
type SkipMemento ¶
type SkipMemento struct {
// contains filtered or unexported fields
}
SkipMemento remembers previous skip errors, so you can return them all at once later.
func (*SkipMemento) Evaluate ¶
func (sm *SkipMemento) Evaluate() error
Evaluate return a skip error with all previous skips, or nil if none happened.