Documentation ¶
Overview ¶
Package middlewares holds our custom Fiber HTTP middlewares.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiEventsTimeout ¶ added in v0.16.0
type ApiEventsTimeout fiber.Handler
func ProvideApiEventsTimeout ¶ added in v0.16.0
func ProvideApiEventsTimeout(cfg config.Server) ApiEventsTimeout
ProvideApiEventsTimeout is a wire provider for timeout middleware used on /api/v1/events routes.
type ErrorHandler ¶
type ErrorHandler fiber.Handler
func ProvideErrorHandler ¶
func ProvideErrorHandler() ErrorHandler
ProvideErrorHandler is a wire provider for a simple error handler middleware.
type EventsCors ¶
type EventsCors fiber.Handler
Cors middleware for /events handlers.
func ProvideEventsCors ¶
func ProvideEventsCors() EventsCors
ProvideEventsCors is a wire provider for /events cors middleware.
type EventsRateLimiter ¶
type EventsRateLimiter fiber.Handler
func ProvideEventsRateLimiter ¶
func ProvideEventsRateLimiter(cfg config.Server, storage storage.Storage) EventsRateLimiter
ProvideEventsRateLimiter is a wire provider for events endpoints rate limiter.
type Metrics ¶ added in v0.15.0
type Metrics fiber.Handler
func ProvideMetrics ¶ added in v0.15.0
func ProvideMetrics(promRegistry *prometheus.Registry) Metrics
ProvideMetrics is a wire provider for HTTP metrics middleware.
type NonRegisteredOriginFilter ¶ added in v0.14.0
type NonRegisteredOriginFilter fiber.Handler
func ProvideNonRegisteredOriginFilter ¶ added in v0.14.0
func ProvideNonRegisteredOriginFilter(originRegistry originregistry.Service) NonRegisteredOriginFilter
ProvideNonRegisteredOriginFilter is wire provider for middleware that filter request with non registered origins.
type NoscriptHandlersCache ¶ added in v0.16.0
type NoscriptHandlersCache fiber.Handler
func ProvideNoscriptHandlersCache ¶ added in v0.16.0
func ProvideNoscriptHandlersCache() NoscriptHandlersCache
ProvideNoscriptHandlersCache is a wire provider for caching middleware used for GET /api/v1/noscript/events/... handlers.
type ReferrerAsDefaultOrigin ¶
type ReferrerAsDefaultOrigin fiber.Handler
func ProvideReferrerAsDefaultOrigin ¶
func ProvideReferrerAsDefaultOrigin() ReferrerAsDefaultOrigin
ProvideReferrerAsDefaultOrigin is a wire provider for a middleware that sets request origin to referrer header if undefined.
type RequestId ¶
type RequestId fiber.Handler
func ProvideRequestId ¶
ProvideRequestId define a wire provider for request id middleware.
type RequestIdKey ¶
type RequestIdKey struct{}