interceptor

package
v0.0.0-...-26d813d Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GRPCTLSCertInfoInterceptor

func GRPCTLSCertInfoInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

GRPCTLSCertInfoInterceptor is an interceptor for grpc.It catches tls cert info from grpc context.Context, and you can get tls cert info by TLSCertFromGRPCContext.

func HTTPTLSCertInfoInterceptor

func HTTPTLSCertInfoInterceptor(c *gin.Context)

HTTPTLSCertInfoInterceptor is an interceptor for gin.It catches tls cert info from gin.Context, and you can get tls cert info by TLSCertFromGinContext.

func TLSCertFromGRPCContext

func TLSCertFromGRPCContext(ctx context.Context) (p *pkix.Name)

TLSCertFromGRPCContext get tls cert info from grpc context.

func TLSCertFromGinContext

func TLSCertFromGinContext(c *gin.Context) *pkix.Name

TLSCertFromGinContext get tls cert info from gin context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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