Documentation ¶
Index ¶
- func InsertDistScanArtifacts(db *sqlx.DB, layerHash string, dists []*claircore.Distribution, ...) error
- func InsertDistributions(db *sqlx.DB, dists []*claircore.Distribution) error
- func InsertPackageScanArtifacts(db *sqlx.DB, layerHash string, pkgs []*claircore.Package, ...) error
- func InsertPackages(db *sqlx.DB, pkgs []*claircore.Package) error
- func InsertRepoScanArtifact(db *sqlx.DB, layerHash string, repos []*claircore.Repository, ...) error
- func InsertRepositories(db *sqlx.DB, repos []*claircore.Repository) error
- func InsertScannerList(db *sqlx.DB, hash string, n int) error
- func InsertUniqueScanners(db *sqlx.DB, scnrs indexer.VersionedScanners) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InsertDistScanArtifacts ¶
func InsertDistScanArtifacts(db *sqlx.DB, layerHash string, dists []*claircore.Distribution, scnrs indexer.VersionedScanners) error
InsertDistScanArtifacts will create DistributionScanArtifacts linking the layer hash, dists, and scnr artifacts. if multiple scnrs are provided they will be liked in i % n fashion where i is the current index of the Dists array and n is the len of the scnrs array.
func InsertDistributions ¶
func InsertDistributions(db *sqlx.DB, dists []*claircore.Distribution) error
func InsertPackageScanArtifacts ¶
func InsertPackageScanArtifacts(db *sqlx.DB, layerHash string, pkgs []*claircore.Package, scnrs indexer.VersionedScanners) error
InsertPackageScanArtifacts will create ScanArtifacts linking the layer hash, packages, and scnr artifacts. if multiple scnrs are provided they will be liked in i % n fashion where i is the current index of the Packages array and n is the len of the scnrs array.
func InsertPackages ¶
InsertUniquePackages inserts each unique package into the database. Nested distribution and source packages are un nested and inserted. The pkgs array should be created by a call to GenUniquePackages
func InsertRepoScanArtifact ¶
func InsertRepoScanArtifact(db *sqlx.DB, layerHash string, repos []*claircore.Repository, scnrs indexer.VersionedScanners) error
func InsertRepositories ¶
func InsertRepositories(db *sqlx.DB, repos []*claircore.Repository) error
func InsertScannerList ¶
InsertScannerList is to be used with `claircore.test.GenUniqueScanners()`. Inserts a ScannerList record for scanner IDs 0...n associated with provided manifest hash
func InsertUniqueScanners ¶
func InsertUniqueScanners(db *sqlx.DB, scnrs indexer.VersionedScanners) error
InsertUniqueScanners inserts each unique scanner into the database. the scanner's primary key (int) is set to the index of the scanner in the array.
Types ¶
This section is empty.