middlewares

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package middlewares provides middlewares for common usage, such as working with cookies via gRPC.

Index

Constants

This section is empty.

Variables

View Source
var CookiesWriterName = "cookiesWriterName"

Functions

func CookiesMiddleware

func CookiesMiddleware(next http.Handler, cookieNames []string) http.Handler

CookiesMiddleware reads provided cookies from request and paste them into context for graphql purposes. After all operations - calls next handler.

func RequestIDMiddleware added in v1.1.6

func RequestIDMiddleware(next http.Handler) http.Handler

RequestIDMiddleware generates request ID and paste it to provided context for later usage.

func TracingMiddleware added in v1.2.4

func TracingMiddleware(next http.Handler, tp *tracing.TraceProvider, spanConfig tracing.SpanConfig) http.Handler

TracingMiddleware creates root span of request and logs its Start and End events.

Types

This section is empty.

Jump to

Keyboard shortcuts

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