middleware

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package middleware defines common http middlewares.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplySharedCors

func ApplySharedCors() func(next http.Handler) http.Handler

func Logger

func Logger(originalLogger *zap.SugaredLogger) func(http.Handler) http.Handler

func RequestID

func RequestID(next http.Handler) http.Handler

RequestID adds an uuid request ID to the current context if it is not already set.

func RequestIDFromContext

func RequestIDFromContext(ctx context.Context) string

RequestIDFromContext pulls the request ID from the context, if one was set. If one was not set, it returns and empty string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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