validator

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMiddleware

func NewMiddleware() eh.CommandHandlerMiddleware

NewMiddleware returns a new async handling middleware that validate commands with its own validation method.

Types

type Command

type Command interface {
	eh.Command

	// Validate returns the error when validating the command.
	Validate() error
}

Command is a command with its own validation method.

func CommandWithValidation

func CommandWithValidation(cmd eh.Command, v func() error) Command

CommandWithValidation returns a wrapped command with a validation method.

Jump to

Keyboard shortcuts

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