Documentation ¶ Index ¶ type Paginator func Paging(p *Param, result interface{}) *Paginator type Param Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Paginator ¶ type Paginator struct { TotalRecord int `json:"count"` TotalPage int `json:"total_page"` Records interface{} `json:"data"` Offset int `json:"-"` Limit int `json:"per_page"` Page int `json:"page"` PrevPage int `json:"-"` NextPage int `json:"-"` } Paginator 分页返回 func Paging ¶ func Paging(p *Param, result interface{}) *Paginator Paging 分页 type Param ¶ type Param struct { DB *gorm.DB Page int Limit int OrderBy []string ShowSQL bool } Param 分页参数 Source Files ¶ View all Source files pagination.go Click to show internal directories. Click to hide internal directories.