Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFieldJSONTag ¶
GetFieldJSONTag returns field's `json` tag name
Types ¶
type StructValidError ¶
type StructValidError struct {
// contains filtered or unexported fields
}
StructValidError represents an error for the struct validation use `ValidationErrors` to get the map of fields with error text
func NewStructValidError ¶
func NewStructValidError(errsMap map[string]string, errTxt ...string) *StructValidError
NewStructValidError creates new structValidError with given map of errors and optional error text
func (StructValidError) Error ¶
func (err StructValidError) Error() string
func (*StructValidError) Format ¶
func (err *StructValidError) Format() map[string]interface{}
Format returns map of errors for use as a response
func (*StructValidError) ValidationErrors ¶
func (err *StructValidError) ValidationErrors() map[string]string
ValidationErrors returns map of fields errors
Click to show internal directories.
Click to hide internal directories.