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) Custom(data gin.H)
- func (e *Api) DownloadExcel(fileName string, data []byte)
- func (e *Api) Error(code int, err error, msg 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) MakeOrm() *Api
- func (e *Api) MakeService(c *service.Service) *Api
- func (e *Api) OK(data interface{}, msg string)
- func (e *Api) PageOK(result interface{}, count int, pageIndex int, pageSize int, msg string)
- 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.