Images tag (#5957)

* Feat: Add pagination for listing repository tags (#683)

* feat: add pagination for listing repository tags

Signed-off-by: wenhaozhou <wenhaozhou@yunify.com>

* use ParseQueryParameter

Signed-off-by: wenhaozhou <wenhaozhou@yunify.com>

---------

Signed-off-by: wenhaozhou <wenhaozhou@yunify.com>

* feat: add tags total count (#695) (#698)

Signed-off-by: wenhaozhou <wenhaozhou@yunify.com>

---------

Signed-off-by: wenhaozhou <wenhaozhou@yunify.com>
This commit is contained in:
Wenhao Zhou
2023-10-26 17:27:26 +08:00
committed by GitHub
parent 5c685102de
commit b4a9ee425b
4 changed files with 15 additions and 1 deletions

View File

@@ -52,6 +52,7 @@ func (r *registryer) ListRepositoryTags(src string) (RepositoryTags, error) {
Registry: repo.RegistryStr(),
Repository: repo.RepositoryStr(),
Tags: tags,
Total: len(tags),
}, nil
}

View File

@@ -42,6 +42,7 @@ type RepositoryTags struct {
Registry string `json:"registry"`
Repository string `json:"repository"`
Tags []string `json:"tags"`
Total int `json:"total"`
}
// ImageConfig wraps v1.ConfigFile to avoid direct dependency