Documentation ¶
Overview ¶
Package response release api 响应格式
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Error ¶
func Error(w http.ResponseWriter, statusCode int, code errcode.ImageErrorCode, errorMsg string)
Error release api 失败时响应
Types ¶
type ErrorMsg ¶
type ErrorMsg struct { Code string `json:"code,omitempty"` Msg string `json:"msg,omitempty"` Context interface{} `json:"ctx,omitempty"` }
ErrorMsg release api 错误消息格式
type Response ¶
type Response struct { Success bool `json:"success"` Data interface{} `json:"data,omitempty"` Err ErrorMsg `json:"err,omitempty"` }
Response 内部约定的Resposne格式, 更多,请参考: https://yuque.antfin-inc.com/terminus_paas_dev/paas/fozwef
Click to show internal directories.
Click to hide internal directories.