Versions in this module Expand all Collapse all v1 v1.0.0 Dec 8, 2024 Changes in this version + const ContextRequestIDKey + const HeaderXRequestIDKey + var ErrLimitExceed = errors.New("[RATELIMIT] service unavailable due to rate limit exceeded") + var ErrNotAllowed = errors.New("[BREAKER] request failed due to circuit breaker is open") + var Middlewares = defaultMiddlewares() + func AccessLog() gin.HandlerFunc + func Auth(paths ...string) gin.HandlerFunc + func Breaker(opts ...BreakerOption) gin.HandlerFunc + func Cors() gin.HandlerFunc + func GetRequestIDFromContext(c *gin.Context) string + func GetRequestIDFromHeaders(c *gin.Context) string + func Logging() gin.HandlerFunc + func Metrics(serviceName string) gin.HandlerFunc + func NoCache(c *gin.Context) + func Options(c *gin.Context) + func Ratelimit(opts ...LimiterOption) gin.HandlerFunc + func RequestID() gin.HandlerFunc + func Secure(c *gin.Context) + func SignMd5Middleware() gin.HandlerFunc + func Timeout(t time.Duration) gin.HandlerFunc + func Tracing(serviceName string, opts ...Option) gin.HandlerFunc + type BreakerOption func(*options) + func WithGroup(g *group.Group) BreakerOption + type LimiterOption func(*limiterOptions) + func WithLimiter(limiter ratelimit.Limiter) LimiterOption + type Option func(*config) + func WithPropagators(propagators propagation.TextMapPropagator) Option + func WithTracerProvider(provider oteltrace.TracerProvider) Option