Documentation
¶
Index ¶
- func DecodeJSON(r *http.Request, v any) error
- func Logger(next http.Handler) http.Handler
- func MaxBodyBytes(max int64) func(http.Handler) http.Handler
- func ReturnError(ctx context.Context, w http.ResponseWriter, returningErr error)
- func WriteJSON(ctx context.Context, w http.ResponseWriter, status int, v any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Logger ¶
Logger is a middleware that injects a zerolog.Logger into the context, and logs the request with method, path, status, and duration.
func ReturnError ¶
func ReturnError(ctx context.Context, w http.ResponseWriter, returningErr error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.