Documentation ¶
Index ¶
- func NewStore(dbFilePath string, overwrite bool) (*Store, CleanupFn, error)
- type CleanupFn
- type Store
- func (s *Store) AddVulnerability(vulnerabilities ...*db.Vulnerability) error
- func (s *Store) AddVulnerabilityMetadata(metadata ...*db.VulnerabilityMetadata) error
- func (s *Store) GetID() (*db.ID, error)
- func (s *Store) GetVulnerability(namespace, packageName string) ([]db.Vulnerability, error)
- func (s *Store) GetVulnerabilityMetadata(id, recordSource string) (*db.VulnerabilityMetadata, error)
- func (s *Store) SetID(id db.ID) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store holds an instance of the database connection
func (*Store) AddVulnerability ¶
func (s *Store) AddVulnerability(vulnerabilities ...*db.Vulnerability) error
AddVulnerability saves a vulnerability in the sqlite3 store
func (*Store) AddVulnerabilityMetadata ¶
func (s *Store) AddVulnerabilityMetadata(metadata ...*db.VulnerabilityMetadata) error
func (*Store) GetVulnerability ¶
func (s *Store) GetVulnerability(namespace, packageName string) ([]db.Vulnerability, error)
Get retrieves one or more vulnerabilities given a namespace and package name
func (*Store) GetVulnerabilityMetadata ¶
func (s *Store) GetVulnerabilityMetadata(id, recordSource string) (*db.VulnerabilityMetadata, error)
Click to show internal directories.
Click to hide internal directories.