Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FieldError ¶
FieldError creates an instance of BadFieldError without an index
Types ¶
type BadFieldError ¶
type BadFieldError struct { Field string `json:"field,omitempty"` Msg string `json:"msg"` Index *int `json:"index,omitempty"` Data interface{} }
BadFieldError implements error. It describes an error relating to an object and/or field.
func BadFieldErrorFromStr ¶
func BadFieldErrorFromStr(str string) *BadFieldError
BadFieldErrorFromStr attempts to convert a string to a BadFieldError. It expects the string to match the BadFieldError.Error output.
func (*BadFieldError) Error ¶
func (b *BadFieldError) Error() string
func (*BadFieldError) Is ¶
func (b *BadFieldError) Is(target error) bool
type ReqError ¶
ReqError describes an error consumable by http services.
func ReqErrorFromStr ¶
ReqErrorFromStr attempts to convert a string to a ReqError. It expects the string to match the ReqError.Error output. Never returns an error even on failure.
Click to show internal directories.
Click to hide internal directories.