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.
Click to show internal directories.
Click to hide internal directories.