Documentation ¶
Overview ¶
Package middleware package
Index ¶
- func PrometheusMiddleware(next http.Handler) http.Handler
- type Handler
- func HTTPRateLimiterMiddleware(logger logger.Logger, respWriter response.Writer, store ratelimitstore.Store) Handler
- func NewAuthenticationMiddleware(authenticator *auth.Authenticator, logger logger.Logger, ...) Handler
- func NewCommonHeadersMiddleware(headers map[string]string) Handler
- func NewRequireAuthenticatedCallerMiddleware(logger logger.Logger, respWriter response.Writer) Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
Handler is used for returning middleware functions
func HTTPRateLimiterMiddleware ¶ added in v0.11.0
func HTTPRateLimiterMiddleware( logger logger.Logger, respWriter response.Writer, store ratelimitstore.Store, ) Handler
HTTPRateLimiterMiddleware creates a handler for HTTP rate limiting.
func NewAuthenticationMiddleware ¶ added in v0.11.0
func NewAuthenticationMiddleware( authenticator *auth.Authenticator, logger logger.Logger, respWriter response.Writer, ) Handler
NewAuthenticationMiddleware resolves whether the caller has authenticated. If so, it sets the caller on the context. In either case, it sets the subject string on the context.
func NewCommonHeadersMiddleware ¶ added in v0.6.0
NewCommonHeadersMiddleware creates an instance of CommonHeadersMiddleware
Click to show internal directories.
Click to hide internal directories.