middlewares

package
v0.161.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RateKeyFunc

type RateKeyFunc func(ctx *gin.Context) (string, error)

RateKeyFunc is a function for rate key.

type RedisRateLimiter added in v0.157.0

type RedisRateLimiter struct {
	// contains filtered or unexported fields
}

RedisRateLimiter is middleware for rate limiting using Redis.

func NewRedisRateLimiter added in v0.157.0

func NewRedisRateLimiter(keyGen RateKeyFunc) *RedisRateLimiter

NewRedisRateLimiter creates new Redis-based rate limiter middleware.

func (*RedisRateLimiter) Middleware added in v0.157.0

func (r *RedisRateLimiter) Middleware() gin.HandlerFunc

Middleware returns Gin middleware.

Jump to

Keyboard shortcuts

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