repositories

package
v0.3.14 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCVESummaryK8sResourceName added in v0.2.109

func GetCVESummaryK8sResourceName(ctx context.Context) (string, error)

func GetCVESummaryK8sResourceNamespace added in v0.2.110

func GetCVESummaryK8sResourceNamespace(ctx context.Context) (string, error)

Types

type APIServerStore added in v0.2.99

type APIServerStore struct {
	StorageClient spdxv1beta1.SpdxV1beta1Interface
	Namespace     string
}

APIServerStore implements both CVERepository and SBOMRepository with in-cluster storage (apiserver) to be used for production

func NewAPIServerStorage added in v0.2.99

func NewAPIServerStorage(namespace string) (*APIServerStore, error)

NewAPIServerStorage initializes the APIServerStore struct

func NewFakeAPIServerStorage added in v0.2.99

func NewFakeAPIServerStorage(namespace string) *APIServerStore

func (*APIServerStore) GetCVE added in v0.2.99

func (a *APIServerStore) GetCVE(ctx context.Context, name, SBOMCreatorVersion, CVEScannerVersion, CVEDBVersion string) (domain.CVEManifest, error)

func (*APIServerStore) GetCVESummary added in v0.3.0

func (*APIServerStore) GetSBOM added in v0.2.99

func (a *APIServerStore) GetSBOM(ctx context.Context, name, SBOMCreatorVersion string) (domain.SBOM, error)

func (*APIServerStore) GetSBOMp added in v0.2.99

func (a *APIServerStore) GetSBOMp(ctx context.Context, name, sbomCreatorVersion string) (domain.SBOM, error)

func (*APIServerStore) StoreCVE added in v0.2.99

func (a *APIServerStore) StoreCVE(ctx context.Context, cve domain.CVEManifest, withRelevancy bool) error

func (*APIServerStore) StoreCVESummary added in v0.2.110

func (a *APIServerStore) StoreCVESummary(ctx context.Context, cve domain.CVEManifest, cvep domain.CVEManifest, withRelevancy bool) error

func (*APIServerStore) StoreSBOM added in v0.2.99

func (a *APIServerStore) StoreSBOM(ctx context.Context, sbom domain.SBOM) error

func (*APIServerStore) StoreVEX added in v0.3.0

func (a *APIServerStore) StoreVEX(ctx context.Context, cve domain.CVEManifest, cvep domain.CVEManifest, withRelevancy bool) error

type BrokenStore added in v0.2.99

type BrokenStore struct{}

func NewBrokenStorage added in v0.2.99

func NewBrokenStorage() *BrokenStore

func (BrokenStore) GetCVE added in v0.2.99

func (BrokenStore) GetCVESummary added in v0.3.0

func (BrokenStore) GetSBOM added in v0.2.99

func (b BrokenStore) GetSBOM(ctx context.Context, _ string, _ string) (domain.SBOM, error)

func (BrokenStore) GetSBOMp added in v0.2.99

func (b BrokenStore) GetSBOMp(ctx context.Context, _ string, _ string) (domain.SBOM, error)

func (BrokenStore) StoreCVE added in v0.2.99

func (b BrokenStore) StoreCVE(ctx context.Context, _ domain.CVEManifest, _ bool) error

func (BrokenStore) StoreCVESummary added in v0.2.110

func (b BrokenStore) StoreCVESummary(ctx context.Context, _ domain.CVEManifest, _ domain.CVEManifest, _ bool) error

func (BrokenStore) StoreSBOM added in v0.2.99

func (b BrokenStore) StoreSBOM(ctx context.Context, _ domain.SBOM) error

func (BrokenStore) StoreVEX added in v0.3.0

type MemoryStore

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

MemoryStore implements both CVERepository and SBOMRepository with in-memory storage (maps) to be used for tests

func NewMemoryStorage

func NewMemoryStorage(getError, storeError bool) *MemoryStore

NewMemoryStorage initializes the MemoryStore struct and its maps

func (*MemoryStore) GetCVE

func (m *MemoryStore) GetCVE(ctx context.Context, name, SBOMCreatorVersion, CVEScannerVersion, CVEDBVersion string) (domain.CVEManifest, error)

GetCVE returns a CVE manifest from an in-memory map

func (*MemoryStore) GetCVESummary added in v0.3.0

GetCVE returns a CVE manifest from an in-memory map

func (*MemoryStore) GetSBOM

func (m *MemoryStore) GetSBOM(ctx context.Context, name, SBOMCreatorVersion string) (domain.SBOM, error)

GetSBOM returns a SBOM from an in-memory map

func (*MemoryStore) GetSBOMp

func (m *MemoryStore) GetSBOMp(ctx context.Context, instanceID, SBOMCreatorVersion string) (domain.SBOM, error)

GetSBOMp returns a SBOM' from an in-memory map

func (*MemoryStore) StoreCVE

func (m *MemoryStore) StoreCVE(ctx context.Context, cve domain.CVEManifest, _ bool) error

StoreCVE stores a CVE manifest to an in-memory map

func (*MemoryStore) StoreCVESummary added in v0.2.110

func (m *MemoryStore) StoreCVESummary(ctx context.Context, cve domain.CVEManifest, cvep domain.CVEManifest, withRelevancy bool) error

StoreCVE stores a CVE Summary to an in-memory map

func (*MemoryStore) StoreSBOM

func (m *MemoryStore) StoreSBOM(ctx context.Context, sbom domain.SBOM) error

StoreSBOM stores an SBOM to an in-memory map

func (*MemoryStore) StoreVEX added in v0.3.0

func (m *MemoryStore) StoreVEX(ctx context.Context, cve domain.CVEManifest, cvep domain.CVEManifest, withRelevancy bool) error

StoreVEX stores a VEX to an in-memory map

Jump to

Keyboard shortcuts

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