middleware

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cors

func Cors() gin.HandlerFunc

func InitLogger

func InitLogger(cfg config.LogConfig) (err error)

InitLogger 初始化Logger

func JWTAuthMiddleware

func JWTAuthMiddleware() gin.HandlerFunc

JWTAuthMiddleware 基于JWT的认证中间件--验证用户是否登录

func ZapLogger

func ZapLogger() gin.HandlerFunc

ZapLogger 接收gin框架的路由日志

func ZapRecovery

func ZapRecovery(stack bool) gin.HandlerFunc

ZapRecovery recover掉项目可能出现的panic,并使用zap记录相关日志

Types

This section is empty.

Jump to

Keyboard shortcuts

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