middleware

package
v1.44.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2025 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthMiddlewareErrHandler added in v1.43.1

func AuthMiddlewareErrHandler(err error, _ echo.Context) error

func DebugSkipper

func DebugSkipper(_ echo.Context) bool

DebugSkipper is the skipper used in debug mode, we log everything.

func DefaultSkipper

func DefaultSkipper(c echo.Context) bool

DefaultSkipper is what we use as a default. Some endpoints are excluded from the logs to avoid flooding the logs and because they are not bringing a lot of value.

func DefaultVersionHeaderSkipper added in v1.42.0

func DefaultVersionHeaderSkipper(_ echo.Context) bool

func VersionHeader added in v1.30.0

func VersionHeader(cfg VersionHeaderConfig) echo.MiddlewareFunc

VersionHeader is a middleware that adds the version of the relayproxy in the header.

func WebsocketAuthorizer added in v1.12.0

func WebsocketAuthorizer(config *config.Config) echo.MiddlewareFunc

WebsocketAuthorizer is a middleware that checks in the params if we have the needed parameter for authorization

func ZapLogger

func ZapLogger(log *zap.Logger, cfg *config.Config) echo.MiddlewareFunc

ZapLogger is a middleware and zap to provide an "access log" like logging for each request.

Types

type VersionHeaderConfig added in v1.42.0

type VersionHeaderConfig struct {
	Skipper          middleware.Skipper
	RelayProxyConfig *config.Config
}

VersionHeaderConfig defines the configuration for the middleware.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL