mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-22 07:10:41 -08:00
* chore(mod): update dependencies * fix(scanner): make scanner take a cache client as the argument * refactor: sort imports * refactor(cache): create a struct to clear cache * fix(cache): use a struct to clear cache * fix(wire): update constructor to take cache struct * fix(cache): use the constructor generated by wire * docs(cli): update the option description * fix(cache): use the cache struct * fix(cache): split Reset into ClearDB and ClearImages
24 lines
713 B
Go
24 lines
713 B
Go
// +build wireinject
|
|
|
|
package client
|
|
|
|
import (
|
|
"github.com/aquasecurity/fanal/cache"
|
|
"github.com/aquasecurity/trivy/pkg/rpc/client/library"
|
|
"github.com/aquasecurity/trivy/pkg/rpc/client/ospkg"
|
|
"github.com/aquasecurity/trivy/pkg/scanner"
|
|
"github.com/aquasecurity/trivy/pkg/vulnerability"
|
|
"github.com/google/wire"
|
|
)
|
|
|
|
func initializeScanner(cacheClient cache.Cache, ospkgCustomHeaders ospkg.CustomHeaders, libraryCustomHeaders library.CustomHeaders,
|
|
ospkgURL ospkg.RemoteURL, libURL library.RemoteURL) scanner.Scanner {
|
|
wire.Build(scanner.ClientSet)
|
|
return scanner.Scanner{}
|
|
}
|
|
|
|
func initializeVulnerabilityClient() vulnerability.Client {
|
|
wire.Build(vulnerability.SuperSet)
|
|
return vulnerability.Client{}
|
|
}
|