Documentation ¶ Index ¶ func Auth(next http.Handler) http.Handler func AuthMiddleware(secretKey string) func(next http.Handler) http.Handler func Logger(next http.Handler) http.Handler func RateLimiter(config RateLimiterConfig) func(http.Handler) http.Handler type RateLimiterConfig Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Auth ¶ func Auth(next http.Handler) http.Handler func AuthMiddleware ¶ func AuthMiddleware(secretKey string) func(next http.Handler) http.Handler AuthMiddleware is a middleware function for JWT authentication func Logger ¶ func Logger(next http.Handler) http.Handler func RateLimiter ¶ func RateLimiter(config RateLimiterConfig) func(http.Handler) http.Handler RateLimiter is a middleware function to enforce rate limiting. Types ¶ type RateLimiterConfig ¶ type RateLimiterConfig struct { MaxRequests int // Maximum allowed requests Window time.Duration // Time window for the rate limit DB *badger.DB // BadgerDB instance } RateLimiterConfig defines the settings for the rate limiter. Source Files ¶ auth-v1.goauth.gologger.goratelimit.go Click to show internal directories. Click to hide internal directories.