mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
feat(search): update search pattern matching rules (#1257)
Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
This commit is contained in:
@@ -3150,7 +3150,7 @@ func TestGlobalSearchImageAuthor(t *testing.T) {
|
||||
Repos {
|
||||
Name LastUpdated Size
|
||||
Platforms { Os Arch }
|
||||
Vendors Score
|
||||
Vendors
|
||||
NewestImage {
|
||||
RepoName Tag LastUpdated Size IsSigned
|
||||
Authors
|
||||
@@ -3213,7 +3213,7 @@ func TestGlobalSearchImageAuthor(t *testing.T) {
|
||||
Repos {
|
||||
Name LastUpdated Size
|
||||
Platforms { Os Arch }
|
||||
Vendors Score
|
||||
Vendors
|
||||
NewestImage {
|
||||
RepoName Tag LastUpdated Size IsSigned
|
||||
Authors
|
||||
@@ -3427,7 +3427,7 @@ func TestGlobalSearch(t *testing.T) {
|
||||
Repos {
|
||||
Name LastUpdated Size
|
||||
Platforms { Os Arch }
|
||||
Vendors Score
|
||||
Vendors
|
||||
NewestImage {
|
||||
RepoName Tag LastUpdated Size
|
||||
Manifests{
|
||||
@@ -3516,7 +3516,7 @@ func TestGlobalSearch(t *testing.T) {
|
||||
Repos {
|
||||
Name LastUpdated Size
|
||||
Platforms { Os Arch }
|
||||
Vendors Score
|
||||
Vendors
|
||||
NewestImage {
|
||||
RepoName Tag LastUpdated Size
|
||||
Manifests {
|
||||
@@ -3753,7 +3753,7 @@ func TestGlobalSearch(t *testing.T) {
|
||||
Repos {
|
||||
Name LastUpdated Size
|
||||
Platforms { Os Arch }
|
||||
Vendors Score
|
||||
Vendors
|
||||
NewestImage {
|
||||
RepoName Tag LastUpdated Size
|
||||
Manifests {
|
||||
@@ -3843,7 +3843,7 @@ func TestGlobalSearch(t *testing.T) {
|
||||
Repos {
|
||||
Name LastUpdated Size
|
||||
Platforms { Os Arch }
|
||||
Vendors Score
|
||||
Vendors
|
||||
NewestImage {
|
||||
RepoName Tag LastUpdated Size
|
||||
Manifests {
|
||||
|
||||
@@ -15,7 +15,6 @@ type RepoSummary struct {
|
||||
Size string `json:"size"`
|
||||
Platforms []Platform `json:"platforms"`
|
||||
Vendors []string `json:"vendors"`
|
||||
Score int `json:"score"`
|
||||
NewestImage ImageSummary `json:"newestImage"`
|
||||
}
|
||||
|
||||
@@ -33,7 +32,6 @@ type ImageSummary struct {
|
||||
Licenses string `json:"licenses"`
|
||||
Labels string `json:"labels"`
|
||||
Title string `json:"title"`
|
||||
Score int `json:"score"`
|
||||
Source string `json:"source"`
|
||||
Documentation string `json:"documentation"`
|
||||
Authors string `json:"authors"`
|
||||
|
||||
@@ -482,7 +482,6 @@ func (olu BaseOciLayoutUtils) GetExpandedRepoInfo(repoName string) (RepoInfo, er
|
||||
manifestDigest := man.Digest.String()
|
||||
configDigest := manifest.Config.Digest.String()
|
||||
lastUpdated := GetImageLastUpdated(imageConfigInfo)
|
||||
score := 0
|
||||
|
||||
imageSummary := ImageSummary{
|
||||
RepoName: repoName,
|
||||
@@ -501,7 +500,6 @@ func (olu BaseOciLayoutUtils) GetExpandedRepoInfo(repoName string) (RepoInfo, er
|
||||
LastUpdated: lastUpdated,
|
||||
IsSigned: isSigned,
|
||||
Size: size,
|
||||
Score: score,
|
||||
Description: annotations.Description,
|
||||
Title: annotations.Title,
|
||||
Documentation: annotations.Documentation,
|
||||
@@ -546,7 +544,6 @@ func (olu BaseOciLayoutUtils) GetExpandedRepoInfo(repoName string) (RepoInfo, er
|
||||
Platforms: repoPlatforms,
|
||||
NewestImage: lastUpdatedImageSummary,
|
||||
Vendors: repoVendors,
|
||||
Score: -1,
|
||||
}
|
||||
|
||||
repo.Summary = summary
|
||||
|
||||
Reference in New Issue
Block a user