validator

package
v0.0.0-...-f39411c Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Validator

type Validator struct {
}

Validator implements our validator domain interface. It is used by each http endpoint to validate received parameters.

func NewValidator

func NewValidator() *Validator

NewValidator returns a Validator that can be used by any http endpoint to validate its parameters.

func (*Validator) Validate

func (v *Validator) Validate(payload interface{}) []error

Validate takes a struct as parameter and validates it using fieldtag. fields without field tags are ignored.

Jump to

Keyboard shortcuts

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