feat: add catalog endpoint for listing repositories#246
Open
michael-herwig wants to merge 1 commit intooras-project:mainfrom
Open
feat: add catalog endpoint for listing repositories#246michael-herwig wants to merge 1 commit intooras-project:mainfrom
michael-herwig wants to merge 1 commit intooras-project:mainfrom
Conversation
fb258be to
eb34b30
Compare
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>
eb34b30 to
8ed6ca4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
catalog()method implementing the OCI Distribution Spec/v2/_catalogendpointCatalogResponsestruct for typed deserializationto_catalog_url()URL helper following theto_list_tags_url()patternn(page size) andlast(last repo from previous page)Details
The implementation follows the existing
list_tags()pattern exactly:store_auth_if_needed→ build request with optional query params →RequestBuilderWrapper→apply_auth→ send → validate → deserializeCatalogResponse(consistent withTagResponsepattern) rather thanVec<String>Test plan
test_to_catalog_urlverifies URL generation for standard and mirror registriestest_catalog(gated behindtest-registryfeature) pushes to two repos, verifies both appear in catalog response, and tests pagination withn/lastparameters