Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrResponse ¶
type IResponse ¶
type IResponse interface { Serialize(singleModel interface{}) interface{} Paginate(modelSlice interface{}) interface{} }
type PageResponse ¶
type Response ¶
type Response struct { Code int `json:"code" example:"0"` // 业务状态码 Data interface{} `json:"data"` // 数据 }
type Serializer ¶
type Serializer struct { }
var RespSerializer *Serializer
func (*Serializer) Paginate ¶
func (serializer *Serializer) Paginate(resp IResponse, modelSlice interface{}, page int, perPage int) *PageResponse
func (*Serializer) Serialize ¶
func (serializer *Serializer) Serialize(resp IResponse, singleModel interface{}) *Response
Click to show internal directories.
Click to hide internal directories.