middleware

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GzipCompress

func GzipCompress(next http.Handler) http.Handler

func GzipDecompress

func GzipDecompress(next http.Handler) http.Handler

func SetLogger

func SetLogger(lg *zap.Logger) func(next http.Handler) http.Handler

SetLogger returns a middleware that logs the start and end of each request, along with some useful data about what was requested, what the response status was, and how long it took to return. Taken from https://github.com/jonnylangefeld/go-api/blob/master/pkg/middelware/logger.go Inspired by https://github.com/treastech/logger

Types

This section is empty.

Jump to

Keyboard shortcuts

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