Documentation
¶
Overview ¶
Package middlewares provides middlewares for common usage, such as working with cookies via gRPC.
Index ¶
- Variables
- func CookiesMiddleware(next http.Handler, cookieNames []string) http.Handler
- func GraphQLLoggingMiddleware(next http.Handler, logger logging.Logger) http.Handler
- func RequestIDMiddleware(next http.Handler) http.Handler
- func TracingMiddleware(next http.Handler, logger logging.Logger, tp tracing.Provider, ...) http.Handler
Constants ¶
This section is empty.
Variables ¶
View Source
var CookiesWriterName = "cookiesWriterName"
Functions ¶
func CookiesMiddleware ¶
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
GraphQLLoggingMiddleware logs GraphQL request info, such as query type, name, fields, variables and return fields.
func RequestIDMiddleware ¶ added in v1.1.6
RequestIDMiddleware generates request ID and paste it to provided context for later usage.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.