mw

package
v0.64.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 32 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const RateLimiterDefaultUser = "_"

Variables

This section is empty.

Functions

func GRPCAuthInterceptor

func GRPCAuthInterceptor(providers *AuthProviders) grpc.UnaryServerInterceptor

func GRPCLogInterceptor

func GRPCLogInterceptor(l *tracing.Logger) grpc.UnaryServerInterceptor

func GRPCMetricInterceptor

func GRPCMetricInterceptor() grpc.UnaryServerInterceptor

func GRPCProcessHeadersInterceptor

func GRPCProcessHeadersInterceptor() grpc.UnaryServerInterceptor

func GRPCRateLimitInterceptor

func GRPCRateLimitInterceptor(rateLimiters map[string]map[string]RateLimiter) grpc.UnaryServerInterceptor

func GRPCRecoverInterceptor

func GRPCRecoverInterceptor() grpc.UnaryServerInterceptor

func GRPCTraceInterceptor

func GRPCTraceInterceptor() grpc.UnaryServerInterceptor

func HTTPAuthInterceptor

func HTTPAuthInterceptor(providers *AuthProviders) func(next http.Handler) http.Handler

func HTTPLogInterceptor

func HTTPLogInterceptor(l *tracing.Logger) func(next http.Handler) http.Handler

func HTTPMetricInterceptor

func HTTPMetricInterceptor() func(next http.Handler) http.Handler

func HTTPNotFoundInterceptor

func HTTPNotFoundInterceptor() func(next http.Handler) http.Handler

func HTTPProcessHeadersInterceptor

func HTTPProcessHeadersInterceptor() func(next http.Handler) http.Handler

func HTTPRateLimitInterceptor

func HTTPRateLimitInterceptor(rateLimiters map[string]map[string]RateLimiter) func(next http.Handler) http.Handler

func HTTPRecoverInterceptor

func HTTPRecoverInterceptor() func(next http.Handler) http.Handler

func HTTPTraceInterceptor

func HTTPTraceInterceptor() func(next http.Handler) http.Handler

Types

type AuthProviders

type AuthProviders struct {
	JwtProvider  auth.JWTProvider
	OidcProvider auth.OIDCProvider
}

func NewAuthProviders

func NewAuthProviders(
	ctx context.Context,
	jwtSecretKey string, oidcCfg *config.OIDC,
	cacheCfg config.Cache,
) (AuthProviders, error)

type RateLimiter

type RateLimiter struct {
	// contains filtered or unexported fields
}

func NewRateLimiter

func NewRateLimiter(api string, cfg config.RateLimiter) (RateLimiter, error)

Jump to

Keyboard shortcuts

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