Documentation
¶
Index ¶
- func ErrorHandler(next http.Handler) http.Handler
- func GetRequestID(ctx context.Context) string
- func RequestID(next http.Handler) http.Handler
- func RequestLogger(next http.Handler) http.Handler
- func SetBadRequestError(r *http.Request, err error)
- func SetError(r *http.Request, status int, err error)
- func SetInternalError(r *http.Request, err error)
- func SetNotFoundError(r *http.Request, err error)
- func SetUnauthorizedError(r *http.Request, err error)
- type ErrorResponse
- type RequestError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorHandler ¶
ErrorHandler middleware processes any errors set during request handling
func GetRequestID ¶
func RequestLogger ¶
RequestLogger is a middleware that logs HTTP requests using zerolog
func SetBadRequestError ¶
func SetInternalError ¶
func SetNotFoundError ¶
func SetUnauthorizedError ¶
Types ¶
type ErrorResponse ¶
ErrorResponse represents the standard error response
type RequestError ¶
RequestError holds the error information for a request
Click to show internal directories.
Click to hide internal directories.