Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasePage ¶
type BaseResp ¶
type BaseResp struct { HasMore bool `json:"hasMore"` Start uint32 `json:"start"` List interface{} `json:"list"` }
func BuildResponse ¶
type IResponse ¶
type IResponse interface { Success(data interface{}, msg string) DefaultSuccess(data interface{}) Bind(param interface{}, opts ...Option) error Error(err error) }
func NewResponse ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithDefaultStart ¶
func WithMaxLimit ¶
type PaginationEntity ¶
type PaginationEntity struct { // 是否有下一页 HasMore bool `json:"more"` // 下一页开始数据 Start int32 `json:"start"` // 数据列表 List interface{} `json:"list"` }
PaginationEntity 分页数据体
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
func (*Response) DefaultSuccess ¶
func (r *Response) DefaultSuccess(data interface{})
type ResponseEntity ¶
type ResponseEntity struct { // 错误码 ErrorCode int `json:"errcode"` // 响应消息 Message string `json:"errmsg"` // 响应数据 Data interface{} `json:"data"` }
ResponseEntity 响应数据体
Click to show internal directories.
Click to hide internal directories.