Documentation ¶
Index ¶
Constants ¶
View Source
const ( CodeSuccess = 0 CodeErrApp = iota + 1000 CodeErrMsg CodeErrParam CodeErrNoPriv )
Variables ¶
View Source
var MsgFlags = map[int]string{ CodeErrApp: "内部错误", CodeSuccess: "成功", CodeErrMsg: "未知错误", CodeErrParam: "参数错误", CodeErrNoPriv: "沒有权限", }
Functions ¶
Types ¶
type Gin ¶
func (*Gin) SaveToTarFile ¶
SaveToTarFile 保存为tar压缩文件
type JSONResult ¶
type JSONResult struct { Code int `json:"code" description:"返回码" example:"0000"` Message string `json:"message,omitempty" description:"消息" example:"消息"` Data interface{} `json:"data" description:"数据"` }
func NewRes ¶
func NewRes(data interface{}, err error, code int) *JSONResult
Click to show internal directories.
Click to hide internal directories.