Documentation ¶
Index ¶
- func GetRequestLogger(c *gin.Context) *logger.Helper
- func SetRequestLogger(c *gin.Context)
- type Api
- func (e *Api) AddError(err error)
- func (e Api) Custom(httpCode int, jsonObj any)
- func (e Api) Error(code int, msg string)
- func (e Api) GetOrm() *gorm.DB
- func (e *Api) MakeContext(ctx *gin.Context) *Api
- func (e *Api) MakeOrm() *Api
- func (e *Api) MakeService(c *service.Service) *Api
- func (e Api) Success(msg string, data any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRequestLogger ¶
GetRequestLogger 获取上下文提供的日志
Types ¶
type Api ¶
func (*Api) MakeService ¶
MakeService 设置服务Log、Orm
Click to show internal directories.
Click to hide internal directories.