Versions in this module Expand all Collapse all v0 v0.6.6 Mar 12, 2025 v0.6.5 Mar 7, 2025 v0.6.4 Mar 4, 2025 v0.6.3 Feb 13, 2025 Changes in this version + var ErrHandled = new(BusinessError) + var ErrInternal = NewBusinessError(2, "Internal server error") + var ErrNil = NewBusinessError(0, "Success") + var ErrValidation = NewBusinessError(1, "Invalid parameter") + func MustServe(endpoint string, factory RouteFactory, option ...RouterOption) + func Serve(endpoint string, factory RouteFactory, option ...RouterOption) error + func Wrap(controller func(c *gin.Context) (interface{}, error)) gin.HandlerFunc + type BusinessError struct + Code int + Data interface{} + Message string + func NewBusinessError(code int, message string) *BusinessError + func NewBusinessErrorWithData(code int, message string, data interface{}) *BusinessError + func (be *BusinessError) WithData(data interface{}) *BusinessError + func (err *BusinessError) Error() string + type RouteFactory func(router *gin.Engine) + type RouterOption struct + LoggerForced bool + OriginsAllowed []string + RecoveryDisabled bool