repositories

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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() *MemoryStore

NewMemoryStorage initializes the MemoryStore struct and its maps

func (*MemoryStore) GetCVE

func (m *MemoryStore) GetCVE(_ context.Context, imageID, SBOMCreatorVersion, CVEScannerVersion, CVEDBVersion string) (cve domain.CVEManifest, err error)

GetCVE returns a CVE manifest from an in-memory map

func (*MemoryStore) GetSBOM

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

GetSBOM returns a SBOM from an in-memory map

func (*MemoryStore) GetSBOMp

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

GetSBOMp returns a SBOM' from an in-memory map

func (*MemoryStore) StoreCVE

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

StoreCVE stores a CVE manifest 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

Jump to

Keyboard shortcuts

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