Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cursor ¶
func DecodeCursor ¶
DecodeCursor decodes a base64-encoded cursor string into a Cursor object.
func NewCursor ¶
NewCursor creates a new Cursor object with the given time and ID. The time is converted to UTC before being stored.
func (Cursor) Encode ¶
Encode converts the cursor to a base64-encoded string representation. The encoded string is formatted as <RFC3339 time>,<ID>.
func (Cursor) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface. It encodes the cursor into a text form.
func (*Cursor) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface. It decodes the cursor from its text form.
type Item ¶
type Item interface {
// Cursor returns the cursor used for cursor-based ordering
Cursor() Cursor
}
Item is the interface that must be implemented by items used in cursor pagination. It provides access to the time and ID fields needed for cursor generation.