Documentation
¶
Overview ¶
Package paging holds the cursor rules every Nexus list shares. Lists are ordered newest first by ID (IDs are UUIDv7 TypeIDs, so their text sorts in creation order), and a page is continued from the last ID it returned. There are no totals: a total on a growing list is expensive and usually an estimate.
Index ¶
Constants ¶
View Source
const ( // DefaultLimit is the page size when none is asked for. DefaultLimit = 50 // MaxLimit is the largest page a store returns. MaxLimit = 500 )
Variables ¶
View Source
var ErrInvalidCursor = errors.New("nexus: invalid cursor")
ErrInvalidCursor reports a cursor that is not an ID from the list it was handed to. It is never treated as "start again from the top".
Functions ¶
func CheckCursor ¶
CheckCursor accepts "" (the first page) or an ID of the given kind.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.