middleware

package
v0.0.0-...-5c53ccf Latest Latest
Warning

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

Go to latest
Published: May 1, 2025 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthMiddleware

func AuthMiddleware(authService *services.AuthService) gin.HandlerFunc

func CORS

func CORS() gin.HandlerFunc

Types

type JWKStore

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

func NewJWKStore

func NewJWKStore(clerkSecretKey string, redisClient *redis.Client) *JWKStore

func (*JWKStore) GetJWK

func (s *JWKStore) GetJWK(keyID string) *clerk.JSONWebKey

func (*JWKStore) SetJWK

func (s *JWKStore) SetJWK(keyID string, jwk *clerk.JSONWebKey)

type RateLimitConfig

type RateLimitConfig struct {
	Limit  int
	Window time.Duration
}

type RateLimiter

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

func NewRateLimiter

func NewRateLimiter(redisClient *redis.Client) *RateLimiter

func (*RateLimiter) AddLimiter

func (rl *RateLimiter) AddLimiter(name string, config RateLimitConfig)

func (*RateLimiter) Middleware

func (rl *RateLimiter) Middleware(name string) gin.HandlerFunc

Jump to

Keyboard shortcuts

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