mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-22 23:26:39 -08:00
* refactor: embed config * refactor: replace image and layer with artifact and blob * feat(config): add ArtifactConfig * fix(scanner): use Artifact * test(scanner): update mocks * feat: add repo and fs subcommands * chore(mod): update * refactor: fix warn message * feat(cli): add --no-progress to repo and fs * mod: Update fanal dependency Signed-off-by: Simarpreet Singh <simar@linux.com> Co-authored-by: Simarpreet Singh <simar@linux.com>
31 lines
680 B
Go
31 lines
680 B
Go
// +build wireinject
|
|
|
|
package server
|
|
|
|
import (
|
|
"github.com/aquasecurity/fanal/cache"
|
|
"github.com/aquasecurity/trivy/pkg/rpc/server/library"
|
|
"github.com/aquasecurity/trivy/pkg/rpc/server/ospkg"
|
|
"github.com/google/wire"
|
|
)
|
|
|
|
func initializeScanServer(localArtifactCache cache.LocalArtifactCache) *ScanServer {
|
|
wire.Build(ScanSuperSet)
|
|
return &ScanServer{}
|
|
}
|
|
|
|
func initializeOspkgServer() *ospkg.Server {
|
|
wire.Build(ospkg.SuperSet)
|
|
return &ospkg.Server{}
|
|
}
|
|
|
|
func initializeLibServer() *library.Server {
|
|
wire.Build(library.SuperSet)
|
|
return &library.Server{}
|
|
}
|
|
|
|
func initializeDBWorker(cacheDir string, quiet bool) dbWorker {
|
|
wire.Build(DBWorkerSuperSet)
|
|
return dbWorker{}
|
|
}
|