Documentation ¶
Index ¶
- func Eval(ctx context.Context, limiter *redis_rate.Limiter, limit redis_rate.Limit, ...) bool
- func IsRunnable(c *gin.Context, resource string) bool
- func PostwareLimitUser(limiter *redis_rate.Limiter, limit redis_rate.Limit) gin.HandlerFunc
- func PrewareLimitUser(limiter *redis_rate.Limiter, limit redis_rate.Limit) gin.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsRunnable ¶
It has to be used along with Postware middlewares only
func PostwareLimitUser ¶ added in v1.2.4
func PostwareLimitUser(limiter *redis_rate.Limiter, limit redis_rate.Limit) gin.HandlerFunc
This has to be put after actual handler, since it requires input from actual handler. The control is passed using c.Next(), which on limit reach inform in c.c.IsAborted()
func PrewareLimitUser ¶ added in v1.2.4
func PrewareLimitUser(limiter *redis_rate.Limiter, limit redis_rate.Limit) gin.HandlerFunc
This has to be put before actual handler, since it doesn't require any input from actual handler
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.