middleware

package
v0.7.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ContextKey = contextKey("request-id")
View Source
const HeaderKey = "X-Request-Id"

Variables

This section is empty.

Functions

func CleanMultipart

func CleanMultipart(next http.Handler) http.Handler

func GetRequestID

func GetRequestID(r *http.Request) (string, bool)

func RequestID

func RequestID(next http.Handler) http.Handler

func RequestIDField added in v0.2.0

func RequestIDField(ctx context.Context) zap.Field

func WithLogging added in v0.2.0

func WithLogging(log *zap.Logger) func(http.Handler) http.Handler

Logging performs request logging. This method takes heavy inspiration from (github.com/gorilla/handlers).CombinedLoggingHandler.

Types

This section is empty.

Jump to

Keyboard shortcuts

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