Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SuccessResp ¶
Types ¶
type BaseResponse ¶
type BaseResponse struct { Code int `json:"code"` Reason string `json:"reason"` Message string `json:"message"` Meta *Meta `json:"meta,omitempty"` }
func (*BaseResponse) SetMsg ¶
func (r *BaseResponse) SetMsg(msg string) *BaseResponse
func (*BaseResponse) SetPaging ¶
func (r *BaseResponse) SetPaging(page, size int) *BaseResponse
func (*BaseResponse) SetTotal ¶
func (r *BaseResponse) SetTotal(t int) *BaseResponse
type Meta ¶
type Response ¶
type Response struct { *BaseResponse Data interface{} `json:"data,omitempty"` }
func NewResponseFromCode ¶
func NewResponseFromCode(code responsepb.Code) *Response
func NewResponseFromPb ¶
func NewResponseFromPb(base *responsepb.BaseResponse) *Response
Click to show internal directories.
Click to hide internal directories.