reader

package
v0.34.7 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(dbFilePath string) (*Reader, CleanupFn, error)

New creates a new instance of the store.

func Open

func Open(cfg *config) (*sqlittle.DB, error)

Open a new connection to the sqlite3 database file

Types

type CleanupFn

type CleanupFn func() error

CleanupFn is a callback for closing a DB connection.

type Reader

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

Reader holds an instance of the database connection.

func (*Reader) GetID

func (b *Reader) GetID() (*v2.ID, error)

GetID fetches the metadata about the databases schema version and build time.

func (*Reader) GetVulnerability

func (b *Reader) GetVulnerability(namespace, name string) ([]v2.Vulnerability, error)

GetVulnerability retrieves one or more vulnerabilities given a namespace and package name.

func (*Reader) GetVulnerabilityMetadata

func (b *Reader) GetVulnerabilityMetadata(id, recordSource string) (*v2.VulnerabilityMetadata, error)

GetVulnerabilityMetadata retrieves metadata for the given vulnerability ID relative to a specific record source.

Jump to

Keyboard shortcuts

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