feat: initial commit

This commit is contained in:
2025-03-31 16:17:35 +01:00
commit 6719f8a61a
91 changed files with 7119 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
package ratelimiter
import "time"
//! Use Redis for rate limiting when in multiple instances
type Limiter interface {
Allow(ip string) (bool, time.Duration)
}
type Config struct {
RequestsPerTimeFrame int
TimeFrame time.Duration
Enabled bool
}