Documentation
¶
Index ¶
Constants ¶
View Source
const (
// DefaultLimit is the default number of items per page.
DefaultLimit = 20
)
Variables ¶
This section is empty.
Functions ¶
func GetCursorFromRequest ¶
GetCursorFromRequest returns current cursor.
func GetLimitFromRequest ¶
GetLimitFromRequest returns current limit.
Types ¶
type CursorPaginator ¶
type CursorPaginator struct {
Cursor interface{} `json:"-"`
PreviousURI null.String `json:"-"`
// contains filtered or unexported fields
}
CursorPaginator is the paginator with cursor pagination system.
func NewCursorPaginator ¶
func NewCursorPaginator(store Store, request Request) (*CursorPaginator, error)
NewCursorPaginator returns a new CursorPaginator instance.
func (*CursorPaginator) HasNext ¶
func (c *CursorPaginator) HasNext() bool
HasNext returns true if has next page.
func (*CursorPaginator) MakeNextToken ¶
func (p *CursorPaginator) MakeNextToken() null.String
MakeNextToken returns the next page Token.
func (*CursorPaginator) Next ¶
func (p *CursorPaginator) Next() (Paginator, error)
Next returns next items
func (*CursorPaginator) Page ¶
func (p *CursorPaginator) Page() error
Page searches and returns the items
type GOPGStore ¶
type GOPGStore struct {
// contains filtered or unexported fields
}
GORMStore is the store for GOPG ORM.
func NewGOPGStore ¶
NewGOPGStore returns a new go-pg store instance.
Click to show internal directories.
Click to hide internal directories.