Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SimpleValidationErrors ¶
SimpleValidationErrors returns a string map formatted in a descriptive way based on the given validator.ValidationErrors.
Types ¶
type APIError ¶
type APIError struct { Status int // HTTP status returned to client. Err error // Error that occurred. Message string // Additional information about error returned to client. }
APIError represents an error that occurred during an operation on an endpoint.
func NewAPIError ¶
NewAPIError creates a new APIError with the given status, error, and message.
type ValidationError ¶
ValidationError represents an error that was caused by an invalid request.
func DescriptiveValidationErrors ¶
func DescriptiveValidationErrors(verr validator.ValidationErrors) []ValidationError
DescriptiveValidationErrors returns a slice of ValidationErrors formatted in a descriptive way based on the given validator.ValidationErrors.
Click to show internal directories.
Click to hide internal directories.