middlewares

package
v5.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Etag string

Functions

func AllowCORS

func AllowCORS(logger mlog.Logger, h http.Handler) http.Handler

func AuthStreamServerInterceptor

func AuthStreamServerInterceptor() grpc.StreamServerInterceptor

func AuthUnaryServerInterceptor

func AuthUnaryServerInterceptor() grpc.UnaryServerInterceptor

func HttpCache

func HttpCache(h http.Handler) http.Handler

func LoggerUnaryServerInterceptor

func LoggerUnaryServerInterceptor(logger mlog.Logger) func(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp any, err error)

func MetricsServerInterceptor

func MetricsServerInterceptor(logger mlog.Logger) func(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp any, err error)

func MetricsStreamServerInterceptor

func MetricsStreamServerInterceptor(logger mlog.Logger) func(srv any, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error

func Recovery

func Recovery(logger mlog.Logger, h http.Handler) http.Handler

func RouteLogger

func RouteLogger(logger mlog.Logger, h http.Handler) http.Handler

func ValidatorStreamServerInterceptor

func ValidatorStreamServerInterceptor() grpc.StreamServerInterceptor

func ValidatorUnaryServerInterceptor

func ValidatorUnaryServerInterceptor() grpc.UnaryServerInterceptor

Types

type Authorize

type Authorize interface {
	Authorize(ctx context.Context, fullMethodName string) (context.Context, error)
}

type Validator

type Validator interface {
	Validate() error
}

Jump to

Keyboard shortcuts

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