Documentation
¶
Index ¶
- func AdminAuth(cfg config.AdminAuthConfig) gin.HandlerFunc
- func GetRequestID(c *gin.Context) string
- func Recovery() gin.HandlerFunc
- func RequestID() gin.HandlerFunc
- func RequestLogger() gin.HandlerFunc
- func ResponseCache(cacheManager *cache.CacheManager, config CacheConfig) gin.HandlerFunc
- type CacheConfig
- type CachedResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminAuth ¶
func AdminAuth(cfg config.AdminAuthConfig) gin.HandlerFunc
AdminAuth returns a middleware that authenticates admin requests. If auth is disabled in config, it passes all requests through. Supports both Basic Auth and Bearer Token authentication.
func GetRequestID ¶
GetRequestID returns the request_id set by RequestID middleware (if present).
func Recovery ¶
func Recovery() gin.HandlerFunc
Recovery creates a recovery middleware with structured logging
func RequestID ¶
func RequestID() gin.HandlerFunc
RequestID ensures every request has an X-Request-ID header and stores it in gin.Context.
func RequestLogger ¶
func RequestLogger() gin.HandlerFunc
RequestLogger creates a structured logging middleware for Gin
func ResponseCache ¶
func ResponseCache(cacheManager *cache.CacheManager, config CacheConfig) gin.HandlerFunc
ResponseCache creates a middleware that caches HTTP responses
Types ¶
Click to show internal directories.
Click to hide internal directories.