interceptors

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorizationFromContext

func AuthorizationFromContext(ctx context.Context) (string, error)

func AuthorizationFromMetadata

func AuthorizationFromMetadata(md metadata.MD) (string, error)

func HttpErrorHandler

func HttpErrorHandler(logger *logger.Logger) func(ctx context.Context, _ *runtime.ServeMux, _ runtime.Marshaler, writer http.ResponseWriter, _ *http.Request, err error)

func MetadataAuthorization

func MetadataAuthorization() func(context.Context, *http.Request) metadata.MD

func MetadataCookie

func MetadataCookie() func(context.Context, *http.Request) metadata.MD

func MetadataRequestPath

func MetadataRequestPath() func(ctx context.Context, request *http.Request) metadata.MD

func PanicInterceptor

func PanicInterceptor(logger *logger.Logger) grpc.UnaryServerInterceptor

Types

type Cookies

type Cookies []*http.Cookie

func CookiesFromContext

func CookiesFromContext(ctx context.Context) (Cookies, error)

func CookiesFromMetadata

func CookiesFromMetadata(md metadata.MD) (Cookies, error)

func (Cookies) Cookie

func (c Cookies) Cookie(name string) *http.Cookie

Jump to

Keyboard shortcuts

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