mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-12 15:50:15 -08:00
37 lines
1.2 KiB
Go
37 lines
1.2 KiB
Go
// +build wireinject
|
|
|
|
package client
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
"github.com/google/wire"
|
|
|
|
"github.com/aquasecurity/fanal/analyzer"
|
|
"github.com/aquasecurity/fanal/analyzer/config"
|
|
"github.com/aquasecurity/fanal/cache"
|
|
"github.com/aquasecurity/trivy/pkg/result"
|
|
"github.com/aquasecurity/trivy/pkg/rpc/client"
|
|
"github.com/aquasecurity/trivy/pkg/scanner"
|
|
)
|
|
|
|
func initializeDockerScanner(ctx context.Context, imageName string, artifactCache cache.ArtifactCache, customHeaders client.CustomHeaders,
|
|
url client.RemoteURL, timeout time.Duration, disabled []analyzer.Type, configScannerOption config.ScannerOption) (
|
|
scanner.Scanner, func(), error) {
|
|
wire.Build(scanner.RemoteDockerSet)
|
|
return scanner.Scanner{}, nil, nil
|
|
}
|
|
|
|
func initializeArchiveScanner(ctx context.Context, filePath string, artifactCache cache.ArtifactCache,
|
|
customHeaders client.CustomHeaders, url client.RemoteURL, timeout time.Duration, disabled []analyzer.Type,
|
|
configScannerOption config.ScannerOption) (scanner.Scanner, error) {
|
|
wire.Build(scanner.RemoteArchiveSet)
|
|
return scanner.Scanner{}, nil
|
|
}
|
|
|
|
func initializeResultClient() result.Client {
|
|
wire.Build(result.SuperSet)
|
|
return result.Client{}
|
|
}
|