middlewares

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: GPL-3.0 Imports: 12 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 GraphQLLoggingMiddleware added in v1.6.0

func GraphQLLoggingMiddleware(next http.Handler, logger logging.Logger) http.Handler

GraphQLLoggingMiddleware logs GraphQL request info, such as query type, name, fields, variables and return fields.

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,
	logger logging.Logger,
	tp tracing.Provider,
	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