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 int32) *BaseResponse
func (*BaseResponse) SetTotal ¶
func (r *BaseResponse) SetTotal(t int32) *BaseResponse
type Meta ¶
type Response ¶
type Response struct {
*BaseResponse `json:",inline"`
Data interface{} `json:"data,omitempty"`
}
func NewResponseFromCode ¶
func NewResponseFromPb ¶
Click to show internal directories.
Click to hide internal directories.