Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Validation ¶
type ValidationError ¶
type ValidationError struct { Message string `json:"message" xml:"message"` Details []string `json:"details,omitempty" xml:"details,omitempty"` // contains filtered or unexported fields }
ValidationError error object returned from validation.
func IsValidationError ¶
func IsValidationError(err error) (ValidationError, bool)
IsValidationError function convert error as ValidationError.
func (ValidationError) Detail ¶
func (ve ValidationError) Detail() map[string]string
Detail function to get map detail of ValidationError.
func (ValidationError) Error ¶
func (ve ValidationError) Error() string
Error function implement error interface.
func (*ValidationError) SetDetail ¶
func (ve *ValidationError) SetDetail(key, value string)
SetDetail function to set map detail of ValidationError.
type ValidationTranslation ¶
type ValidationTranslation interface { Translator() locales.Translator Register(translator ut.Translator) error }
Click to show internal directories.
Click to hide internal directories.