mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-22 07:10:41 -08:00
* chore(mod): update dependencies * fix(internal): remove cleanup * fix: use only diff_id * fix: use string instead of digest * fix: replace LayerID with Layer * test(integration): negotiate API version * feat(conf): add TRIVY_NONSSL * test(integration): update golden files * test(integration): fix the error message * chore(debian): add comments * chore(mod): update dependencies
32 lines
976 B
Go
32 lines
976 B
Go
// +build wireinject
|
|
|
|
package client
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
"github.com/aquasecurity/fanal/cache"
|
|
"github.com/aquasecurity/trivy/pkg/rpc/client"
|
|
"github.com/aquasecurity/trivy/pkg/scanner"
|
|
"github.com/aquasecurity/trivy/pkg/vulnerability"
|
|
"github.com/google/wire"
|
|
)
|
|
|
|
func initializeDockerScanner(ctx context.Context, imageName string, layerCache cache.ImageCache, customHeaders client.CustomHeaders,
|
|
url client.RemoteURL, timeout time.Duration) (scanner.Scanner, func(), error) {
|
|
wire.Build(scanner.RemoteDockerSet)
|
|
return scanner.Scanner{}, nil, nil
|
|
}
|
|
|
|
func initializeArchiveScanner(ctx context.Context, filePath string, layerCache cache.ImageCache, customHeaders client.CustomHeaders,
|
|
url client.RemoteURL, timeout time.Duration) (scanner.Scanner, error) {
|
|
wire.Build(scanner.RemoteArchiveSet)
|
|
return scanner.Scanner{}, nil
|
|
}
|
|
|
|
func initializeVulnerabilityClient() vulnerability.Client {
|
|
wire.Build(vulnerability.SuperSet)
|
|
return vulnerability.Client{}
|
|
}
|