package
0.0.0-20230101183712-202847b4b89b
Repository: https://github.com/corestoreio/csfw.git
Documentation: pkg.go.dev

# Functions

Chain will iterate over all middleware functions, calling them one by one in a chained manner, returning the result of the final middleware.
ChainFunc will iterate over all middleware functions, calling them one by one in a chained manner, returning the result of the final middleware.
ErrorWithPanic implements the ErrorHandler type and panics always.
ErrorWithStatusCode wraps an HTTP Status Code into an ErrorHandler.
LogErrorWithStatusCode same as ErrorWithStatusCode but does not print the error message and logs it instead with level debug or info.
SetLogger sets a logger to a middleware.
SetMethodOverrideFormKey sets a custom form input name.
WithCloseNotify returns a net.Handler cancelling the context when the client connection close unexpectedly.
WithHeader is a middleware that sets multiple HTTP headers.
WithTimeout returns a net.Handler which adds a timeout to the context.
WithXHTTPMethodOverride adds support for the X-HTTP-Method-Override header.

# Constants

MethodOverrideFormKey represents a commonly used HTML form key to override a request method.
MethodOverrideHeader represents a commonly used http header to override a request method.

# Type aliases

ErrorHandler passes an error to an handler and returns the handler with the wrapped error.
Middleware is a wrapper for the interface http.Handler to create middleware functions.
MiddlewareSlice a slice full of middleware functions and with function receivers attached.
Option contains multiple functional options for middlewares.