sqlite

package
v0.0.0-...-6492362 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStore

func NewStore(dbFilePath string, overwrite bool) (*Store, CleanupFn, error)

NewStore creates a new instance of the store

Types

type CleanupFn

type CleanupFn func() error

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) GetID

func (s *Store) GetID() (*db.ID, 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)

func (*Store) SetID

func (s *Store) SetID(id db.ID) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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