Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockCVEAdapter ¶
type MockCVEAdapter struct { }
MockCVEAdapter implements a mocked CVEScanner to be used for tests
func NewMockCVEAdapter ¶
func NewMockCVEAdapter() *MockCVEAdapter
NewMockCVEAdapter initializes the MockCVEAdapter struct
func (MockCVEAdapter) DBVersion ¶
func (m MockCVEAdapter) DBVersion(context.Context) string
DBVersion returns a static version
func (MockCVEAdapter) Ready ¶
func (m MockCVEAdapter) Ready(context.Context) bool
Ready always returns true
func (MockCVEAdapter) ScanSBOM ¶
func (m MockCVEAdapter) ScanSBOM(ctx context.Context, sbom domain.SBOM) (domain.CVEManifest, error)
ScanSBOM returns a dummy CVE manifest tagged with the given SBOM metadata
type MockPlatform ¶
type MockPlatform struct { }
MockPlatform implements a mocked Platform to be used for tests
func NewMockPlatform ¶
func NewMockPlatform() *MockPlatform
NewMockPlatform initializes the MockPlatform struct
func (MockPlatform) GetCVEExceptions ¶ added in v0.2.99
func (m MockPlatform) GetCVEExceptions(ctx context.Context) (domain.CVEExceptions, error)
GetCVEExceptions returns an empty CVEExceptions
func (MockPlatform) SendStatus ¶
func (m MockPlatform) SendStatus(ctx context.Context, _ int) error
SendStatus logs the given status and details
func (MockPlatform) SubmitCVE ¶
func (m MockPlatform) SubmitCVE(ctx context.Context, _ domain.CVEManifest, _ domain.CVEManifest) error
SubmitCVE logs the given ID for CVE calculation
type MockSBOMAdapter ¶
type MockSBOMAdapter struct {
// contains filtered or unexported fields
}
MockSBOMAdapter implements a mocked SBOMCreator to be used for tests
func NewMockSBOMAdapter ¶
func NewMockSBOMAdapter(error, timeout, toomanyrequests bool) *MockSBOMAdapter
NewMockSBOMAdapter initializes the MockSBOMAdapter struct
func (MockSBOMAdapter) CreateSBOM ¶
func (m MockSBOMAdapter) CreateSBOM(_ context.Context, name, imageID string, _ domain.RegistryOptions) (domain.SBOM, error)
CreateSBOM returns a dummy SBOM for the given imageID
func (MockSBOMAdapter) Version ¶
func (m MockSBOMAdapter) Version() string
Version returns a static version