Documentation
¶
Overview ¶
Package paging holds what every cursor-paged store list shares.
Dispatch IDs are UUIDv7 TypeIDs minted with a monotonic counter, so a row's ID sorts by when it was created. Every paged list orders by ID, newest first, and its cursor is the ID of the last row a page returned: the next page is every matching row whose ID sorts strictly below it. A cursor is therefore stable across inserts and deletes, and a deleted cursor row still marks its place.
Index ¶
Constants ¶
const DefaultLimit = 50
DefaultLimit is the page size when a caller passes zero or less.
Variables ¶
var ErrInvalidCursor = errors.New("dispatch: invalid page cursor")
ErrInvalidCursor is returned when a cursor is not an ID of the kind the list pages by. Stores never fall back to the first page on a bad cursor: a client that sent one would otherwise see page one again and believe it had reached the end.
Functions ¶
Types ¶
This section is empty.