Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConflictError ¶
func NewInternalError ¶
func NewNotFoundError ¶
func TranslateValidatorError ¶
func TranslateValidatorError(err error, trans ut.Translator) error
TranslateValidatorError takes an error from the go-playground validator (internally just a map of errors) and converts it into a string which can then be used to create a new error. The purpose of this function is to get around the fact that go-playground validator creates errors that are not in a user friendly format.
Types ¶
type ConflictError ¶
type ConflictError struct {
// contains filtered or unexported fields
}
func (*ConflictError) Error ¶
func (e *ConflictError) Error() string
type InternalError ¶
type InternalError struct {
// contains filtered or unexported fields
}
func (*InternalError) Error ¶
func (e *InternalError) Error() string
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.