package
0.0.0-20250111151448-a34e95e9e662
Repository: https://github.com/nidal-bakir/go-todo-backend.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

AllowContentType enforces a whitelist of request Content-Types otherwise responds with a 415 Unsupported Media Type status.
No description provided by the author
No description provided by the author
Maybe middleware will allow you to change the flow of the middleware stack execution depending on return value of maybeFn(request).
No description provided by the author
NoCache is a simple piece of middleware that sets a number of HTTP headers to prevent a router (or subrouter) from being cached by an upstream proxy and/or client.
PathRewrite is a simple middleware which allows you to rewrite the request URL path.
No description provided by the author
No description provided by the author
No description provided by the author
Recoverer is a middleware that recovers from panics, logs the panic (and a backtrace), and returns a HTTP 500 (Internal Server Error) status if possible.
No description provided by the author
RequestSize is a middleware that will limit request sizes to a specified number of bytes.
No description provided by the author
SetHeader is a convenience handler to set a response header key/value.
StripSlashes is a middleware that will match request paths with a trailing slash, strip it from the path and continue routing through the mux, if a route matches, then it will serve the handler.
Sunset set Deprecation/Sunset header to response This can be used to enable Sunset in a route or a route group NOTE: the sunsetAt Time should be in UTC time zone For more: https://www.rfc-editor.org/rfc/rfc8594.html.
Throttle is a middleware that limits number of currently processed requests at a time across all users.
ThrottleBacklog is a middleware that limits number of currently processed requests at a time and provides a backlog for holding a finite number of pending requests.
ThrottleWithOpts is a middleware that limits number of currently processed requests using passed ThrottleOpts.
Timeout is a middleware that cancels ctx after a given timeout and return a 504 Gateway Timeout error to the client.
WithValue is a middleware that sets a given key/value in a context chain.

# Structs

ThrottleOpts represents a set of throttling options.

# Type aliases

No description provided by the author