middleware

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthCheck

func AuthCheck(api route.Restful) gin.HandlerFunc

AuthCheck

func LoggerWithZap

func LoggerWithZap(zl *zap.Logger) 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 Push404Handler added in v1.1.12

func Push404Handler(ctx *gin.Context)

Push404Handler

func RecoveryWithZap

func RecoveryWithZap(zl *zap.Logger) 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().

Types

This section is empty.

Jump to

Keyboard shortcuts

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