Documentation ¶
Overview ¶
*
- @Time : 2021/1/5 5:09 下午
- @Author : MassAdobe
- @Description: context
*
Index ¶
- func Handle(handle HandlerFunc) gin.HandlerFunc
- type Context
- func (this *Context) Debug(msg string, fields ...zap.Field)
- func (this *Context) Error(msg string, err error, fields ...zap.Field)
- func (this *Context) FailRes(errCode int, data interface{})
- func (this *Context) GetRequestUser() *pojo.RequestUser
- func (this *Context) Info(msg string, fields ...zap.Field)
- func (this *Context) SuccRes(data interface{})
- func (this *Context) SuccResFeign(data interface{})
- func (this *Context) SysDebug(msg string, fields ...zap.Field)
- func (this *Context) SysError(msg string, err error, fields ...zap.Field)
- func (this *Context) SysInfo(msg string, fields ...zap.Field)
- func (this *Context) Warn(msg string, fields ...zap.Field)
- type HandlerFunc
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handle ¶
func Handle(handle HandlerFunc) gin.HandlerFunc
*
- @Author: MassAdobe
- @TIME: 2021/1/6 10:03 上午
- @Description: 处理日志与gin框架合并 处理超时问题
*
Types ¶
type Context ¶
*
- @Author: MassAdobe
- @TIME: 2021/1/7 5:29 下午
- @Description: 自适应context
*
func (*Context) Debug ¶
*
- @Author: MassAdobe
- @TIME: 2020/12/17 7:52 下午
- @Description: 重写Debug日志级别输出
*
func (*Context) Error ¶
*
- @Author: MassAdobe
- @TIME: 2020/12/17 7:52 下午
- @Description: 重写Error日志级别输出
*
func (*Context) FailRes ¶ added in v1.3.2
*
- @Author: MassAdobe
- @TIME: 2020-04-26 21:12
- @Description: 错误时返回 支持data为空
*
func (*Context) GetRequestUser ¶ added in v1.3.2
func (this *Context) GetRequestUser() *pojo.RequestUser
*
- @Author: MassAdobe
- @TIME: 2020-04-28 10:21
- @Description: 获取用户基本信息
*
func (*Context) SuccRes ¶ added in v1.3.2
func (this *Context) SuccRes(data interface{})
*
- @Author: MassAdobe
- @TIME: 2020-04-26 21:12
- @Description: 成功时返回 支持data为空
*
func (*Context) SuccResFeign ¶ added in v1.3.2
func (this *Context) SuccResFeign(data interface{})
*
- @Author: MassAdobe
- @TIME: 2020/12/18 6:19 下午
- @Description: 内部调用 成功时返回 支持data为空
*
func (*Context) SysDebug ¶ added in v1.3.5
*
- @Author: MassAdobe
- @TIME: 2020/12/17 7:52 下午
- @Description: 重写Debug日志级别输出(系统)
*
func (*Context) SysError ¶ added in v1.3.2
*
- @Author: MassAdobe
- @TIME: 2020/12/17 7:52 下午
- @Description: 重写Error日志级别输出(系统)
*
type HandlerFunc ¶
type HandlerFunc func(c *Context)
*
- @Author: MassAdobe
- @TIME: 2021/1/7 5:29 下午
- @Description: 嵌套方法体
*
Click to show internal directories.
Click to hide internal directories.