package
Version:
v0.0.0-...-76b4d0c
Opens a new window with list of versions in this module.
Published: Mar 25, 2020
License: Apache-2.0
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func MarkError(v ...interface{})
MarkError 将错误 存入日志
Gin 实体
func (g *Gin) Response(httpCode, errCode int, data interface{})
Response 返回的数据
func (g *Gin) ResponseFail()
ResponseFail 返回失败
func (g *Gin) ResponseFailErrCode(errCode int)
ResponseFailErrCode 返回失败
ResponseFailError 返回自定义的错误类型
func (g *Gin) ResponseFailValidParam(err error)
ResponseFailValidParam 验证参数错误
func (g *Gin) ResponseSuc(data interface{})
ResponseSuc 返回成功
type HTTPSuccess struct {
Code int `json:"code" example:"200"`
Message string `json:"msg" example:"ok" `
Data string `json:"data" example:"null"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.