Documentation ¶
Index ¶
Constants ¶
View Source
const ( Success = 200 Error = 500 RegisterEmailSendFailed = 10001 // 用户注册邮件发送失败 PasswordIsNotIdentity = 10002 // 密码不一致 GetSmMsApiTokenFailed = 10003 // 获取sm.ms api token 失败 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JsonResponse ¶
type JsonResponse struct { Code int `json:"code"` Message string `json:"message"` Data interface{} `json:"data"` }
func ToJsonResponse ¶
func ToJsonResponse(code int, message string, data ...interface{}) *JsonResponse
ToJsonResponse 封装统一格式api返回的信息
func (*JsonResponse) ToJson ¶
func (res *JsonResponse) ToJson(c *gin.Context)
Click to show internal directories.
Click to hide internal directories.