Documentation ¶
Overview ¶
Package middleware define middlewares for Actions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
Action is a function that takes a context and returns an error. It is is used on Pipers, Defaulters and Publishers, although they are not aware of this generalization.
func ErrHandler ¶
ErrHandler handles an action error, ignoring and logging pipe skipped errors.
func Logging ¶
Logging pretty prints the given action and its title. You can have different padding levels by providing different initial paddings. The middleware will print the title in the given padding and the action logs in padding+default padding. The default padding in the log library is 3. The middleware always resets to the default padding.