Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pagination ¶
Pagination definition.
func BuildPagination ¶
func BuildPagination(page, pageSize int64, sortOrder, sortBy string) *Pagination
BuildPagination create a new *Pagination.
func FirstPage ¶
func FirstPage() *Pagination
FirstPage return a *Pagination with default values offset and page size.
func (*Pagination) GetSortInt ¶
func (p *Pagination) GetSortInt() int
GetSortInt mapping to mongodb sort values.
func (*Pagination) SetOffset ¶
func (p *Pagination) SetOffset(offset int64) *Pagination
SetOffset set the Offset field of the Pagination struct.
func (*Pagination) SetPageSize ¶
func (p *Pagination) SetPageSize(limit int64) *Pagination
SetPageSize set the PageSize field of the Pagination struct.
func (*Pagination) SetSortBy ¶
func (p *Pagination) SetSortBy(by string) *Pagination
SetSortBy set the SortBy field of the Pagination struct.
func (*Pagination) SetSortOrder ¶
func (p *Pagination) SetSortOrder(order string) *Pagination
SetSortOrder set the SortOrder field of the Pagination struct.
Click to show internal directories.
Click to hide internal directories.