Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = ErrorType{"NOT_FOUND", http.StatusNotFound} ErrInternalServer = ErrorType{"INTERNAL_SERVER_ERROR", http.StatusInternalServerError} ErrForbidden = ErrorType{"FORBIDDEN", http.StatusForbidden} ErrConflict = ErrorType{"CONFLICT", http.StatusConflict} ErrBadRequest = ErrorType{"BAD_REQUEST", http.StatusBadRequest} ErrValidation = ErrorType{"VALIDATION_ERROR", http.StatusUnprocessableEntity} ErrNotImplemented = ErrorType{"NOT_IMPLEMENTED", http.StatusNotImplemented} )
Functions ¶
This section is empty.
Types ¶
type BadRequestError ¶
type BadRequestError struct { Error string `json:"error" example:"BAD_REQUEST"` Detail map[string]string `json:"detail" example:"message:Error message"` }
types used for better swagger docs
type ConflictError ¶
type Error ¶
type Error[T any] struct { Error string `json:"error" example:"NOT_FOUND"` Detail T `json:"detail"` }
func DetailedError ¶
type ForbiddenError ¶
type InternalServerError ¶
type NotFoundError ¶
type NotImplementedError ¶
type UnauthorizedError ¶
type UnauthorizedError struct {}
type ValidationError ¶
type ValidationError struct { Error string `json:"error" example:"VALIDATION_ERROR"` Detail []ValidationErrorDetail `json:"detail"` }
type ValidationErrorDetail ¶
Click to show internal directories.
Click to hide internal directories.