Versions in this module Expand all Collapse all v0 v0.1.2 Oct 30, 2025 v0.1.1 Oct 28, 2025 Changes in this version + func Error(c *gin.Context, code int, message string) + func ErrorWithStatus(c *gin.Context, httpStatus int, code int, message string) + func Success(c *gin.Context, data interface{}) + type Logger interface + Error func(ctx context.Context, msg string, fields map[string]interface{}) + Info func(ctx context.Context, msg string, fields map[string]interface{}) + Warn func(ctx context.Context, msg string, fields map[string]interface{}) + func NewLoggerAdapter(l logger.Logger) Logger + type LoggerAdapter struct + func (a *LoggerAdapter) Error(ctx context.Context, msg string, fields map[string]interface{}) + func (a *LoggerAdapter) Info(ctx context.Context, msg string, fields map[string]interface{}) + func (a *LoggerAdapter) Warn(ctx context.Context, msg string, fields map[string]interface{}) + type MetricData struct + Duration time.Duration + Method string + Path string + Status int + type MetricRecorder interface + RecordRequest func(data MetricData) + type Mode string + const DebugMode + const ReleaseMode + const TestMode + type Option func(*options) + func WithCORS() Option + func WithLogger(logger Logger) Option + func WithMaxBodyLogSize(size int64) Option + func WithMaxMultipartMemory(size int64) Option + func WithMetric(recorder MetricRecorder) Option + func WithMiddleware(middlewares ...gin.HandlerFunc) Option + func WithMode(mode Mode) Option + func WithPrettyJSON() Option + func WithRecover() Option + func WithServiceName(name string) Option + func WithSkipPaths(paths ...string) Option + func WithSlowRequestThreshold(duration time.Duration) Option + func WithTrace() Option + type Response struct + Code int + Data interface{} + Message string + type Server struct + func New(opts ...Option) *Server + func (s *Server) Engine() *gin.Engine + func (s *Server) Run(addr string) error + func (s *Server) RunWithGracefulShutdown(addr string) error + func (s *Server) Shutdown(ctx context.Context) error