handler

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMessageIsInvalid = errors.New("Message is invalid and failWhenInvalid was set to true")

ErrMessageIsInvalid is the error used when a message did not pass validation and failWhenInvalid option was set to true.

Functions

func ValidateMessage

func ValidateMessage(validator message.Validator, failWhenInvalid bool) watermillmessage.HandlerFunc

ValidateMessage validates a message. If invalid, It injects the validation error into the message Metadata. By default, next handler will always be called, including whenever the message is invalid. In case you want to make it fail, set failWhenInvalid to true.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL