Documentation ¶
Index ¶
- Variables
- func GetRequestLogger(c *gin.Context) *logger.Helper
- func SetRequestLogger(c *gin.Context)
- type Api
- func (e *Api) AddError(err error)
- func (e *Api) Bind(d interface{}, bindings ...binding.Binding) *Api
- func (e *Api) Data(data interface{})
- func (e *Api) Fail(msgCode int, message ...string)
- func (e Api) GetLogger() *logger.Helper
- func (e Api) GetOrm() (*gorm.DB, error)
- func (e *Api) MakeContext(c *gin.Context) *Api
- func (e *Api) MakeModel(mm ...*model.Model) *Api
- func (e *Api) MakeOrm() *Api
- func (e *Api) MakeService(c *service.Service) *Api
- func (e *Api) Ok(result interface{})
- func (e *Api) Page(total int64, pageSize int, pageIndex int, rows interface{})
- func (e Api) Translate(form, to interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultLanguage = "zh-CN"
Functions ¶
func GetRequestLogger ¶
GetRequestLogger 获取上下文提供的日志
Types ¶
Click to show internal directories.
Click to hide internal directories.