mirror of
https://github.com/project-zot/zot.git
synced 2026-06-15 20:07:55 +08:00
RepoSummary has a new attribute NewestTag of type ImageSummary
ImageListWithLatestTag currently returns a list of ImageInfo objects. It needs to return consistent results with the API used for Global search as the same information will be used by the UI in the same type or cards. So we need to update RepoSummary to include the data which right now is present in ImageInfo, but missing from RepoSummary (information on the latest tag in that specific repo). Will update return type of ImageListWithLatestTag in a later PR (issue tracked in a separate GH issue) Closes #666 Signed-off-by: Andrei Aaron <andaaron@cisco.com>
This commit is contained in:
committed by
Andrei Aaron
parent
87fc941b3c
commit
b5f27c5b50
@@ -20,7 +20,7 @@ type OciLayoutUtilsMock struct {
|
||||
GetImageVendorFn func(imageInfo ispec.Image) string
|
||||
GetImageManifestSizeFn func(repo string, manifestDigest godigest.Digest) int64
|
||||
GetImageConfigSizeFn func(repo string, manifestDigest godigest.Digest) int64
|
||||
GetRepoLastUpdatedFn func(repo string) (time.Time, error)
|
||||
GetRepoLastUpdatedFn func(repo string) (common.TagInfo, error)
|
||||
GetExpandedRepoInfoFn func(name string) (common.RepoInfo, error)
|
||||
GetImageConfigInfoFn func(repo string, manifestDigest godigest.Digest) (ispec.Image, error)
|
||||
}
|
||||
@@ -105,12 +105,12 @@ func (olum OciLayoutUtilsMock) GetImageConfigSize(repo string, manifestDigest go
|
||||
return 0
|
||||
}
|
||||
|
||||
func (olum OciLayoutUtilsMock) GetRepoLastUpdated(repo string) (time.Time, error) {
|
||||
func (olum OciLayoutUtilsMock) GetRepoLastUpdated(repo string) (common.TagInfo, error) {
|
||||
if olum.GetRepoLastUpdatedFn != nil {
|
||||
return olum.GetRepoLastUpdatedFn(repo)
|
||||
}
|
||||
|
||||
return time.Time{}, nil
|
||||
return common.TagInfo{}, nil
|
||||
}
|
||||
|
||||
func (olum OciLayoutUtilsMock) GetExpandedRepoInfo(name string) (common.RepoInfo, error) {
|
||||
|
||||
Reference in New Issue
Block a user