Documentation ¶
Index ¶
Constants ¶
View Source
const NbReqStatusHeader = "Nb-Req-Status"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiResp ¶
type ApiResp struct { Code int `json:"code"` Msg string `json:"msg,omitempty"` Data interface{} `json:"data,omitempty"` }
func (*ApiResp) BeegoServeJSON ¶
func (self *ApiResp) BeegoServeJSON(c beego.Controller)
BeegoServeJSON 返回 json 内容 @deprecated
func (*ApiResp) ReturnJSON ¶
func (self *ApiResp) ReturnJSON(c beego.Controller, httpCode ...int)
ReturnJSON 返回 json 内容 httpCode 默认为200, 业务请求状态码在 response header 中的 "nb-req-status" 体现
Click to show internal directories.
Click to hide internal directories.