package
Version:
v1.8.1
Opens a new window with list of versions in this module.
Published: Oct 20, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package pagination implements stable created-time and TypeID continuation.
Encode returns an opaque continuation for an entity.
Page sorts an already scoped collection and applies continuation without requiring the anchor to still exist.
Trim removes the lookahead row and reports continuation only when more rows exist.
type Position struct {
CreatedAt time.Time `json:"created_at"`
ID id.ID `json:"id"`
}
Position is the last returned entity in descending creation order.
Decode validates a cursor. An empty cursor starts at the newest entity.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.