Documentation
¶
Overview ¶
Package bindvalidate is package of validators and sanitizers for strings, structs and collections. Form Post is removed as we use JSON API only
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StatusTitle ¶
StatusTitle returns a text for the HTTP status code. It returns the empty string if the code is unknown.
Types ¶
type JSONError ¶
type JSONError struct { Code string `json:"code"` // an application-specific error code, expressed as a string value. Title string `json:"title"` // a short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. Source string `json:"source"` // an object containing references to the source of the error Detail string `json:"detail"` // a human-readable explanation specific to this occurrence of the problem. }
JSONError custom implementation of JSONAPI error
type JSONErrors ¶
type JSONErrors struct {
Errors []*JSONError `json:"errors"`
}
JSONErrors for multiple return
func (JSONErrors) Error ¶
func (e JSONErrors) Error() string
Click to show internal directories.
Click to hide internal directories.