services

package
v0.3.36 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockScanService added in v0.2.99

type MockScanService struct {
	// contains filtered or unexported fields
}

func NewMockScanService added in v0.2.99

func NewMockScanService(happy bool) *MockScanService

func (MockScanService) GenerateSBOM added in v0.2.99

func (m MockScanService) GenerateSBOM(context.Context) error

func (MockScanService) Ready added in v0.2.99

func (MockScanService) ScanCVE added in v0.2.99

func (m MockScanService) ScanCVE(context.Context) error

func (MockScanService) ScanRegistry added in v0.2.99

func (m MockScanService) ScanRegistry(context.Context) error

func (MockScanService) ValidateGenerateSBOM added in v0.2.99

func (m MockScanService) ValidateGenerateSBOM(ctx context.Context, _ domain.ScanCommand) (context.Context, error)

func (MockScanService) ValidateScanCVE added in v0.2.99

func (m MockScanService) ValidateScanCVE(ctx context.Context, _ domain.ScanCommand) (context.Context, error)

func (MockScanService) ValidateScanRegistry added in v0.2.99

func (m MockScanService) ValidateScanRegistry(ctx context.Context, _ domain.ScanCommand) (context.Context, error)

type ScanService

type ScanService struct {
	// contains filtered or unexported fields
}

ScanService implements ScanService from ports, this is the business component business logic should be independent of implementations

func NewScanService

func NewScanService(sbomCreator ports.SBOMCreator, sbomRepository ports.SBOMRepository, cveScanner ports.CVEScanner, cveRepository ports.CVERepository, platform ports.Platform, storage bool, vexGeneration bool) *ScanService

NewScanService initializes the ScanService with all injected dependencies

func (*ScanService) GenerateSBOM

func (s *ScanService) GenerateSBOM(ctx context.Context) error

GenerateSBOM implements the "Generate SBOM flow"

func (*ScanService) Ready

func (s *ScanService) Ready(ctx context.Context) bool

Ready proxies the cveScanner's readiness

func (*ScanService) ScanCVE

func (s *ScanService) ScanCVE(ctx context.Context) error

ScanCVE implements the "Scanning for CVEs flow"

func (*ScanService) ScanRegistry added in v0.2.99

func (s *ScanService) ScanRegistry(ctx context.Context) error

func (*ScanService) ValidateGenerateSBOM

func (s *ScanService) ValidateGenerateSBOM(ctx context.Context, workload domain.ScanCommand) (context.Context, error)

func (*ScanService) ValidateScanCVE

func (s *ScanService) ValidateScanCVE(ctx context.Context, workload domain.ScanCommand) (context.Context, error)

func (*ScanService) ValidateScanRegistry added in v0.2.99

func (s *ScanService) ValidateScanRegistry(ctx context.Context, workload domain.ScanCommand) (context.Context, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL