middlewares

package
v0.155.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: Apache-2.0 Imports: 6 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 RateLimiterMiddleware

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

RateLimiterMiddleware is middleware for Gin.

func NewRateLimiter

func NewRateLimiter(keyGen RateKeyFunc) *RateLimiterMiddleware

NewRateLimiter creates new middleware.

func (*RateLimiterMiddleware) Middleware

func (r *RateLimiterMiddleware) 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