Documentation ¶
Index ¶
- func GetLimit(c *gin.Context) int
- func GetPage(c *gin.Context) int
- func GetSize(c *gin.Context) int
- func Page(tx *gorm.DB, pageable Pageable) *gorm.DB
- func PageWithDefaultOrder(tx *gorm.DB, pageable Pageable, defaultOrder ...string) *gorm.DB
- func PageWithDefaultSort(tx *gorm.DB, pageable Pageable, defaultSort ...Sort) *gorm.DB
- type Pageable
- type Pagination
- type Sort
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PageWithDefaultOrder ¶
Types ¶
type Pageable ¶
type Pageable interface { GetPage() int GetSize() int GetSort() []Sort GetLimit() int GetOffset() int NoSort() bool }
func GetPageable ¶
type Pagination ¶
func (*Pagination) GetLimit ¶
func (p *Pagination) GetLimit() int
func (*Pagination) GetOffset ¶
func (p *Pagination) GetOffset() (offset int)
func (*Pagination) GetPage ¶
func (p *Pagination) GetPage() int
func (*Pagination) GetSize ¶
func (p *Pagination) GetSize() int
func (*Pagination) GetSort ¶
func (p *Pagination) GetSort() []Sort
func (*Pagination) NoSort ¶
func (p *Pagination) NoSort() bool
Click to show internal directories.
Click to hide internal directories.