middleware

package
v0.0.0-...-95714bc Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ContextUserIDKey = "user_id"
View Source
const ContextUserLogin = "login"

Variables

This section is empty.

Functions

func JWTAuthorization

func JWTAuthorization() gin.HandlerFunc

func Logger

func Logger() gin.HandlerFunc

Logger 接收gin框架默认的日志

func RateLimit

func RateLimit(fillInterval time.Duration, capacity int64) gin.HandlerFunc

RateLimit 令牌桶限流 1s多少个

func Recovery

func Recovery(stack bool) gin.HandlerFunc

Recovery recover掉项目可能出现的panic

Types

This section is empty.

Jump to

Keyboard shortcuts

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