Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewErrorResponse ¶
func NewErrorResponse(w http.ResponseWriter, status int, err string)
NewErrorResponse writes an error response to the provided http.ResponseWriter with the given status code and error message.
func ValidationError ¶
func ValidationError(errs validator.ValidationErrors) string
ValidationError generates a string message from the provided validation errors.
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Message string `json:"message"`
}
ErrorResponse represents an error response returned by the API.
Click to show internal directories.
Click to hide internal directories.