http_middleware

package
v0.0.0-...-53c1a21 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EchoRequestID

func EchoRequestID() echo.MiddlewareFunc

func EchoRequestLogger

func EchoRequestLogger(logger *zap.Logger, opts ...LogOption) echo.MiddlewareFunc

func Echox

func Echox(service string) echo.MiddlewareFunc

func WrapMiddleware

func WrapMiddleware(m echo.MiddlewareFunc, opts ...LogOption) echo.MiddlewareFunc

Types

type LogOption

type LogOption func(*options)

LogOption is an option for a request logger.

func SkipURL

func SkipURL(urls ...string) LogOption

func WithLogBody

func WithLogBody(b bool) LogOption

type RequestFilter

type RequestFilter func(url string) bool

RequestFilter returns false if the request should be filtered out and true otherwise

func ExcludeURLs

func ExcludeURLs(urls ...string) RequestFilter

ExcludeURLs returns a RequestFilter that only logs requests for URLs in the urls parameter

Jump to

Keyboard shortcuts

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