middleware

package
v0.0.0-...-525798f Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggerWithZap

func LoggerWithZap(logMaxTime, sendMaxTime time.Duration) gin.HandlerFunc

LoggerWithZap returns a gin.HandlerFunc (middleware) that logs requests using uber-go/zap. Requests with errors are logged using zap.Error(). Requests without errors are logged using zap.Info().

func RecoveryWithZap

func RecoveryWithZap() gin.HandlerFunc

RecoveryWithZap returns a gin.HandlerFunc (middleware) that recovers from any panics and logs requests using uber-go/zap. All errors are logged using zap.Error().

func RestCheck

func RestCheck(c types.ICheck, routes types.Restful) gin.HandlerFunc

func WithRestCheck

func WithRestCheck(routes types.Restful) option.App

func WithZapLogger

func WithZapLogger() option.App

func WithZapRecovery

func WithZapRecovery() option.App

Types

This section is empty.

Jump to

Keyboard shortcuts

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