middleware

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2021 License: Apache-2.0 Imports: 7 Imported by: 2

README

echo-middleware

This project provides a collection of echo middleware used in API / Web projects.

GitHub Actions status Go Report Card Documentation

License

This code was authored by Mark Wolfe and licensed under the Apache 2.0 license.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ZeroLogRequestLog added in v1.1.0

func ZeroLogRequestLog() echo.MiddlewareFunc

ZeroLogRequestLog returns a request logger middleware with default config.

func ZeroLogRequestLogWithConfig added in v1.1.0

func ZeroLogRequestLogWithConfig(config ZeroLogRequestLogConfig) echo.MiddlewareFunc

ZeroLogRequestLogWithConfig returns a request logger middleware with config.

func ZeroLogWithConfig

func ZeroLogWithConfig(cfg ZeroLogConfig) echo.MiddlewareFunc

ZeroLogWithConfig setup and return an echo middleware with zerolog logger available from the context.Context.

Types

type ZeroLogConfig

type ZeroLogConfig struct {
	Caller bool
	Level  zerolog.Level
	Output io.Writer
	Fields map[string]interface{}
}

ZeroLogConfig used to configure the zerolog echo middleware

type ZeroLogRequestLogConfig added in v1.1.0

type ZeroLogRequestLogConfig struct {
	// Skipper defines a function to skip middleware.
	Skipper middleware.Skipper
}

ZeroLogRequestLogConfig defines the config for the request logger middleware

Jump to

Keyboard shortcuts

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