Files
trivy/pkg/rpc/server/inject.go
Teppei Fukuda 2f2d1a908b feat: support repository and filesystem scan (#503)
* 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>
2020-05-30 19:46:12 +03:00

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{}
}