Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConfigurableHandler ¶
func NewConfigurableHandler(next, actualHandler http.Handler, cfgs ...ConfigurableMiddlewareOption) *configurableHandler
NewConfigurableHandler creates a configurableHandler, that wraps anther handler. actualHandler is the handler, that is called if the request is not ignored
func NewIgnorePrefixMiddleware ¶
func NewIgnorePrefixMiddleware(actualMiddleware func(http.Handler) http.Handler, prefixes ...string) func(http.Handler) http.Handler
NewIgnorePrefixMiddleware creates a middleware that wraps the actualMiddleware. The handler of this middleware skips the actual middleware if the path has a prefix of the prefixes slice.
Types ¶
type ConfigurableMiddlewareOption ¶
type ConfigurableMiddlewareOption func(*configurableHandler) error
ConfigurableMiddlewareOption is a functional option to configure the handler
func WithoutPrefixes ¶
func WithoutPrefixes(prefix ...string) ConfigurableMiddlewareOption
WithoutPrefixes allows to configure the ignoredPrefix slice
Click to show internal directories.
Click to hide internal directories.