api

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: MIT Imports: 7 Imported by: 1 module, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchAllPages added in v1.0.0

func FetchAllPages[T any](ac *client.AlpaconClient, endpoint string, params map[string]string) ([]T, error)

FetchAllPages walks every page. It is FetchPagesUpTo with no bound.

func FetchCursorPages added in v1.9.2

func FetchCursorPages[T any](ac *client.AlpaconClient, endpoint string, params map[string]string, limit int) ([]T, error)

FetchCursorPages follows the Elasticsearch cursor contract, accumulating up to limit items.

func FetchPagesUpTo added in v1.11.0

func FetchPagesUpTo[T any](ac *client.AlpaconClient, endpoint string, params map[string]string, limit int) ([]T, error)

FetchPagesUpTo walks PageNumber pages until it has limit items, so a caller asking for more than one page's worth is not silently cut off at the server's page cap.

Types

type CursorListResponse added in v1.9.2

type CursorListResponse[T any] struct {
	Next    string `json:"next"`
	Results []T    `json:"results"`
}

CursorListResponse decodes the Elasticsearch cursor-pagination contract (base64 next token, not ListResponse's int page).

type ListResponse

type ListResponse[T any] struct {
	Count    int `json:"count"`
	Current  int `json:"current"`
	Next     int `json:"next"`
	Previous int `json:"previous"`
	Last     int `json:"last"`
	Results  []T `json:"results"`
}

Jump to

Keyboard shortcuts

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