Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { Key string `json:"key"` Type string `json:"type"` Message string `json:"message"` }
Error defines the structure when returning validation errors.
type Validation ¶
type Validation struct {
Package *pkgValidate.Validate
}
Validation defines site wide validation for endpoints and using the Package validation helper.
func (*Validation) CmdCheck ¶
func (v *Validation) CmdCheck(key string, data interface{}) error
CmdCheck is a function for checking validation by struct on the command line.
func (*Validation) Process ¶
func (v *Validation) Process(errors pkgValidate.ValidationErrors) []Error
Process handles validation errors and passes back to respond.
type Validator ¶
type Validator interface { Process(errors pkgValidate.ValidationErrors) []Error CmdCheck(key string, data interface{}) error // contains filtered or unexported methods }
Validator defines methods for checking the validation errors
Click to show internal directories.
Click to hide internal directories.