pagecursor

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package pagecursor encodes opaque keyset pagination tokens for Admin list endpoints. Agent Protocol client search stays limit/offset-only.

Index

Constants

View Source
const HeaderNextCursor = "X-Next-Cursor"

HeaderNextCursor is set on Admin list responses when another page exists (len(items) == limit). Clients pass the value back as ?cursor=.

Variables

This section is empty.

Functions

func EncodeKey

func EncodeKey(key, id string) string

EncodeKey builds an opaque cursor from the last row of a name-ordered page.

func EncodeTime

func EncodeTime(t time.Time, id string) string

EncodeTime builds an opaque cursor from the last row of a time-ordered page.

Types

type KeyCursor

type KeyCursor struct {
	Key string
	ID  string
}

KeyCursor resumes a name ASC, id ASC listing (agents: agent_id; registry: tenant_id as the secondary key under system context).

func DecodeKey

func DecodeKey(s string) (KeyCursor, error)

DecodeKey parses a name-ordered cursor. Empty input returns (zero, nil).

type TimeCursor

type TimeCursor struct {
	Time time.Time
	ID   string
}

TimeCursor resumes a created_at DESC, id DESC listing.

func DecodeTime

func DecodeTime(s string) (TimeCursor, error)

DecodeTime parses a time-ordered cursor. Empty input returns (zero, nil).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL