Documentation ¶
Index ¶
- type MemoryStorage
- func (m *MemoryStorage) GetFiles(_ context.Context, _ string) (model.FileMetadatas, error)
- func (m *MemoryStorage) GetScanSummary(_ context.Context, _ []string) ([]model.SeveritySummary, error)
- func (m *MemoryStorage) GetVulnerabilities(_ context.Context, _ string) ([]model.Vulnerability, error)
- func (m *MemoryStorage) SaveFile(_ context.Context, metadata *model.FileMetadata) error
- func (m *MemoryStorage) SaveVulnerabilities(_ context.Context, vulnerabilities []model.Vulnerability) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryStorage ¶
type MemoryStorage struct {
// contains filtered or unexported fields
}
MemoryStorage is scans' results representation
func NewMemoryStorage ¶
func NewMemoryStorage() *MemoryStorage
NewMemoryStorage creates a new MemoryStorage empty and returns it
func (*MemoryStorage) GetFiles ¶
func (m *MemoryStorage) GetFiles(_ context.Context, _ string) (model.FileMetadatas, error)
GetFiles returns a collection of files saved on MemoryStorage
func (*MemoryStorage) GetScanSummary ¶
func (m *MemoryStorage) GetScanSummary(_ context.Context, _ []string) ([]model.SeveritySummary, error)
GetScanSummary is not supported by MemoryStorage
func (*MemoryStorage) GetVulnerabilities ¶
func (m *MemoryStorage) GetVulnerabilities(_ context.Context, _ string) ([]model.Vulnerability, error)
GetVulnerabilities returns a collection of vulnerabilities saved on MemoryStorage
func (*MemoryStorage) SaveFile ¶
func (m *MemoryStorage) SaveFile(_ context.Context, metadata *model.FileMetadata) error
SaveFile adds a new file metadata to files collection
func (*MemoryStorage) SaveVulnerabilities ¶
func (m *MemoryStorage) SaveVulnerabilities(_ context.Context, vulnerabilities []model.Vulnerability) error
SaveVulnerabilities adds a list of vulnerabilities to vulnerabilities collection
Click to show internal directories.
Click to hide internal directories.