Skip to content

feat: add catalog endpoint for listing repositories#246

Open
michael-herwig wants to merge 1 commit intooras-project:mainfrom
ocx-sh:feature/catalog
Open

feat: add catalog endpoint for listing repositories#246
michael-herwig wants to merge 1 commit intooras-project:mainfrom
ocx-sh:feature/catalog

Conversation

@michael-herwig
Copy link
Copy Markdown
Contributor

Summary

  • Add catalog() method implementing the OCI Distribution Spec /v2/_catalog endpoint
  • Add CatalogResponse struct for typed deserialization
  • Add to_catalog_url() URL helper following the to_list_tags_url() pattern
  • Support pagination via n (page size) and last (last repo from previous page)
  • Add unit test for URL generation and integration test with testcontainers

Details

The implementation follows the existing list_tags() pattern exactly:

  • URL helper for constructing the endpoint URL
  • store_auth_if_needed → build request with optional query params → RequestBuilderWrapperapply_auth → send → validate → deserialize
  • Returns CatalogResponse (consistent with TagResponse pattern) rather than Vec<String>

Test plan

  • Unit test test_to_catalog_url verifies URL generation for standard and mirror registries
  • Integration test test_catalog (gated behind test-registry feature) pushes to two repos, verifies both appear in catalog response, and tests pagination with n/last parameters

Add `catalog()` method and `CatalogResponse` struct implementing the
OCI Distribution Spec `/v2/_catalog` endpoint. Supports pagination via
`n` (page size) and `last` (last repo from previous page).

Follows the same pattern as the existing `list_tags()` method.

Signed-off-by: Michael Herwig <contact@michael-herwig.de>
@michael-herwig michael-herwig changed the title Add catalog endpoint for listing repositories feat: add catalog endpoint for listing repositories Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant