feat(cve): ability to return CVEs per image os and architecture (#1607)

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
This commit is contained in:
Andrei Aaron
2023-07-11 19:29:04 +03:00
committed by GitHub
parent aaf03c75fc
commit 418a1a006c
12 changed files with 658 additions and 97 deletions
+3 -3
View File
@@ -71,7 +71,7 @@ type RepoDBMock struct {
FilterReposFn func(ctx context.Context, filter repodb.FilterRepoFunc, requestedPage repodb.PageInput) (
[]repodb.RepoMetadata, map[string]repodb.ManifestMetadata, map[string]repodb.IndexData, common.PageInfo, error)
FilterTagsFn func(ctx context.Context, filter repodb.FilterFunc,
FilterTagsFn func(ctx context.Context, filterFunc repodb.FilterFunc, filter repodb.Filter,
requestedPage repodb.PageInput,
) ([]repodb.RepoMetadata, map[string]repodb.ManifestMetadata, map[string]repodb.IndexData, common.PageInfo, error)
@@ -301,11 +301,11 @@ func (sdm RepoDBMock) FilterRepos(ctx context.Context, filter repodb.FilterRepoF
map[string]repodb.IndexData{}, common.PageInfo{}, nil
}
func (sdm RepoDBMock) FilterTags(ctx context.Context, filter repodb.FilterFunc,
func (sdm RepoDBMock) FilterTags(ctx context.Context, filterFunc repodb.FilterFunc, filter repodb.Filter,
requestedPage repodb.PageInput,
) ([]repodb.RepoMetadata, map[string]repodb.ManifestMetadata, map[string]repodb.IndexData, common.PageInfo, error) {
if sdm.FilterTagsFn != nil {
return sdm.FilterTagsFn(ctx, filter, requestedPage)
return sdm.FilterTagsFn(ctx, filterFunc, filter, requestedPage)
}
return []repodb.RepoMetadata{}, map[string]repodb.ManifestMetadata{},