Documentation ¶
Index ¶
- type Response
- func (s *Response) AddResponseInfo(key string, val interface{})
- func (s *Response) SetErrorInfo(errno int, msg string)
- func (s *Response) SetResponseDataInfo(key string, value string)
- func (s *Response) SetSuccess()
- func (s *Response) SetSuccessInfo(code int, msg string)
- func (s Response) ToJson() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Response ¶
type Response struct { Data map[string]interface{} `json:"data"` Code int `json:"code"` Msg string `json:"msg"` }
func ErrorResponse ¶
func NewResponse ¶
func NewResponse() *Response
func (*Response) AddResponseInfo ¶
func (*Response) SetErrorInfo ¶
func (*Response) SetResponseDataInfo ¶
func (*Response) SetSuccess ¶
func (s *Response) SetSuccess()
func (*Response) SetSuccessInfo ¶
Click to show internal directories.
Click to hide internal directories.