Expose folder pagination metadata
Merged
RO
2mo ago+128+128+012345678901234567890123456789-3-3-0123456789
Summary
- add
Folders().GetPagealongside the existing source-compatibleGet - expose HEY's
X-Total-Countand opaquerel="next"page cursor - keep pagination requests on the configured origin by returning only the cursor for generated
GetFoldercalls
This unblocks complete folder traversal in hey-cli's CLI and TUI.
Basecamp card: https://app.basecamp.com/2914079/buckets/48521764/card_tables/cards/10206892850
Validation
GOWORK=off make check— pass (146 conformance cases)GOWORK=off go test -race -count=1 ./pkg/hey— passgit diff --check— pass- independent review — no blocking/P2 findings
Summary by cubic
Expose folder pagination so clients can traverse folders completely. Old: Folders().Get returned a folder page without pagination info. New: add Folders().GetPage that returns the folder plus TotalCount and a NextPage cursor; Get now delegates to GetPage and still returns only the folder.
- Introduces
FolderPagewithFolder,NextPage, andTotalCount. - Adds
FoldersService.GetPage(...); parsesX-Total-CountandLink, returning only thepagecursor to keep pagination on the configured origin. - Updates
FoldersService.Getto callGetPageand returnFolder; signature and behavior remain unchanged. - Migration: To paginate, call
GetPageand iterate usingNextPage; no changes required for existingGetusage.