Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Page ¶
type Page struct {
// contains filtered or unexported fields
}
Page is the default implementation of Page interface
func (*Page) GetDataSize ¶
GetDataSize will return the size of data. it's len(GetData())
func (*Page) GetTotalPages ¶
GetTotalPages will return the number of total pages
type Pager ¶
type Pager interface { // GetOffset will return the offset GetOffset() int // GetPageSize will return the page size GetPageSize() int // GetTotalPages will return the number of total pages GetTotalPages() int // GetData will return the data GetData() []interface{} // GetDataSize will return the size of data. // Usually it's len(GetData()) GetDataSize() int // HasNext will return whether has next page HasNext() bool // HasData will return whether this page has data. HasData() bool }
Pager is the abstraction for pagination usage.
Click to show internal directories.
Click to hide internal directories.