Documentation ¶
Index ¶
- func CORS(options cors.Options) gin.HandlerFunc
- func CacheMemory(prefix string, ttl time.Duration) gin.HandlerFunc
- func CacheRedis(prefix string, ttl time.Duration, client *redis.Client) gin.HandlerFunc
- func Logger(logger *slog.Logger, msg string) gin.HandlerFunc
- func NoMethod(methods ...string) gin.HandlerFunc
- func NoRoute() gin.HandlerFunc
- func RateLimit(limiter ratelimit.Limiter, errorHandler func(ctx *gin.Context, err error)) gin.HandlerFunc
- func Recovery(logger *slog.Logger, ...) gin.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheMemory ¶
func CacheMemory(prefix string, ttl time.Duration) gin.HandlerFunc
CacheMemory returns the cache in memory handler
func CacheRedis ¶
func CacheRedis(prefix string, ttl time.Duration, client *redis.Client) gin.HandlerFunc
CacheRedis returns the cache in redis handler
func Logger ¶
func Logger(logger *slog.Logger, msg string) gin.HandlerFunc
Logger returns the access log handler
func NoMethod ¶
func NoMethod(methods ...string) gin.HandlerFunc
NoMethod deals with case of method not allowed
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.