services

package
v0.0.0-...-2cfa632 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2025 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockScanService

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

func NewMockScanService

func NewMockScanService(happy bool) *MockScanService

func (MockScanService) GenerateSBOM

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

func (MockScanService) Ready

func (MockScanService) ScanAP

func (MockScanService) ScanCVE

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

func (MockScanService) ScanRegistry

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

func (MockScanService) ValidateGenerateSBOM

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

func (MockScanService) ValidateScanAP

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

func (MockScanService) ValidateScanCVE

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

func (MockScanService) ValidateScanRegistry

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, relevancyProvider ports.Relevancy, storage bool, vexGeneration bool, sbomGeneration bool, storeFilteredSbom 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" FIXME check if we still use this method

func (*ScanService) Ready

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

Ready proxies the cveScanner's readiness

func (*ScanService) ScanAP

func (s *ScanService) ScanAP(mainCtx context.Context) error

func (*ScanService) ScanCVE

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

ScanCVE implements the "Scanning for CVEs flow"

func (*ScanService) ScanRegistry

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) ValidateScanAP

func (s *ScanService) ValidateScanAP(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

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

func (*ScanService) Version

func (s *ScanService) Version() string

Jump to

Keyboard shortcuts

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