Documentation ¶
Index ¶
- Constants
- func GetMessage(code int) (message string)
- func GetQueryInt64(c *gin.Context, key string) (value int64, err error)
- func Md5(data []byte) (result string)
- func ResponseError(ctx *gin.Context, code int)
- func ResponseSuccess(ctx *gin.Context, data interface{})
- type Node
- type ResponseData
- type Trie
Constants ¶
View Source
const ( ErrCodeSuccess = 0 ErrCodeParameter = 1001 ErrCodeUserExist = 1002 ErrCodeServerBusy = 1003 ErrCodeUserNotExist = 1004 ErrCodeUserPasswordWrong = 1005 ErrCodeCaptionHit = 1006 ErrCodeContentHit = 1007 ErrCodeNotLogin = 1008 ErrCodeRecordExist = 1009 )
Variables ¶
This section is empty.
Functions ¶
func GetMessage ¶
func ResponseError ¶
func ResponseSuccess ¶
Types ¶
type Node ¶
type Node struct { Data interface{} Depth int // contains filtered or unexported fields }
type ResponseData ¶
type ResponseData struct { Code int `json:"code"` Message string `json:"message"` Data interface{} `json:"data"` }
{ "code": 0, //0表示成功,其他表示失败 "message":"success", //用来描述失败的原因 "data":{ } }
Click to show internal directories.
Click to hide internal directories.