Documentation ¶
Index ¶
- Constants
- type Cursors
- type Paginator
- func (p *Paginator) GetNextCursors() Cursors
- func (p *Paginator) Paginate(stmt *gorm.DB, out interface{}) *gorm.DB
- func (p *Paginator) SetAfterCursor(cursor string)
- func (p *Paginator) SetBeforeCursor(cursor string)
- func (p *Paginator) SetKeys(keys ...string)
- func (p *Paginator) SetLimit(limit int)
- func (p *Paginator) SetOrder(order order)
Constants ¶
View Source
const ( // ASC refers to ascending order ASC order = "ASC" // DESC refers to descending order DESC order = "DESC" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cursors ¶
type Cursors struct { AfterCursor string `json:"afterCursor"` BeforeCursor string `json:"beforeCursor"` }
Cursors groups after/before cursors
type Paginator ¶
type Paginator struct {
// contains filtered or unexported fields
}
Paginator a builder doing pagination
func (*Paginator) GetNextCursors ¶
GetNextCursors gets new cursors after pagination
func (*Paginator) Paginate ¶
Paginate paginates data
func (*Paginator) SetAfterCursor ¶
SetAfterCursor sets paging after cursor
func (*Paginator) SetBeforeCursor ¶
SetBeforeCursor sets paging before cursor
Click to show internal directories.
Click to hide internal directories.