middleware

package
v0.0.0-...-63192da Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JWT

func JWT(c *gin.Context)

JWT deal with the token passed in if token is nil,or can't pass the check,or timeout,it will return error query expire time in redis TODO: refresh jwt expire time in redis

func MiddlewareLogging

func MiddlewareLogging(log *logrus.Logger) gin.HandlerFunc

func RequestRateLimiter

func RequestRateLimiter(maxRequests int64, period time.Duration) gin.HandlerFunc

Example: RequestRateLimiter(3, time.Minute) represents 3 requests per minute

Types

This section is empty.

Jump to

Keyboard shortcuts

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