midware

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EchoAppendMiddleware

func EchoAppendMiddleware(echoTelemetry EchoTelemetry, mf ...echo.MiddlewareFunc) []echo.MiddlewareFunc

func EchoLogger

func EchoLogger(l logger.Manager, pathNotLogged ...string) echo.MiddlewareFunc

EchoLogger is the logrus logger handler

func EchoMetrics

func EchoMetrics(opts ...EchoMetricOption) echo.MiddlewareFunc

func EchoResponseWithProperRequestId

func EchoResponseWithProperRequestId(log logger.Manager) echo.MiddlewareFunc

func EchoStaticMiddleware added in v0.1.0

func EchoStaticMiddleware() echo.MiddlewareFunc

func EchoWithAuthApiKeySecrets

func EchoWithAuthApiKeySecrets(maps []ApiKeySecretMap) echo.MiddlewareFunc

func EchoWithAuthApiKeySecretsWithBlacklistClient

func EchoWithAuthApiKeySecretsWithBlacklistClient(maps []ApiKeySecretMap, clientIds ...string) echo.MiddlewareFunc

func EchoWithAuthApiKeySecretsWithWhitelistClient

func EchoWithAuthApiKeySecretsWithWhitelistClient(maps []ApiKeySecretMap, clientIds ...string) echo.MiddlewareFunc

func EchoWithAuthToken

func EchoWithAuthToken(am auth.Manager, realm, clientID string, clientSecret string, permissionScope string) echo.MiddlewareFunc

func EchoWithSecurityHeader

func EchoWithSecurityHeader(overrides map[string]string) echo.MiddlewareFunc

Types

type ApiKeySecretMap

type ApiKeySecretMap struct {
	Key      string `mapstructure:"key"`
	ClientId string `mapstructure:"client_id"`
}

type EchoHttpError

type EchoHttpError interface {
	Middleware() echo.MiddlewareFunc
	Handler(err error, c echo.Context)
}

func NewEchoHttpError

func NewEchoHttpError(tm telemetry.Manager, l logger.Manager) EchoHttpError

type EchoMetricOption

type EchoMetricOption func(*echoMetricConfig)

EchoMetricOption represents an option that can be passed to Middleware.

func EchoMetricWithEnv

func EchoMetricWithEnv(env string) EchoMetricOption

func EchoMetricWithMetrics

func EchoMetricWithMetrics(metric telemetry.MetricsManager) EchoMetricOption

func EchoMetricWithName

func EchoMetricWithName(name string) EchoMetricOption

func EchoMetricWithTelemetry

func EchoMetricWithTelemetry(oTel telemetry.Manager) EchoMetricOption

type EchoOpt

type EchoOpt interface {
	// contains filtered or unexported methods
}

func EchoWithBodyTrace

func EchoWithBodyTrace(bt bool) EchoOpt

func EchoWithMaskedBodyFields

func EchoWithMaskedBodyFields(mbf ...string) EchoOpt

func EchoWithMaskedHeaders

func EchoWithMaskedHeaders(mh ...string) EchoOpt

func EchoWithSkipper

func EchoWithSkipper(skipper middleware.Skipper) EchoOpt

func EchoWithTracerName

func EchoWithTracerName(name string) EchoOpt

type EchoTelemetry

type EchoTelemetry interface {
	EchoOTelPre() echo.MiddlewareFunc
	EchoOTel() echo.MiddlewareFunc
}

func NewEchoTelemetryMiddleware

func NewEchoTelemetryMiddleware(otm telemetry.Manager, opts ...EchoOpt) EchoTelemetry

Jump to

Keyboard shortcuts

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