Documentation ¶
Overview ¶
Package postgres implements the indexer store interface for a PostgreSQL database.
SQL statements should be arranged in this package such that they're constants in the closest scope possible to where they're used. They should be run through sqlfmt and then checked for correctness, as sqlfmt doesn't fully understand the PostgreSQL dialect. Queries should endeavor to do work database-side, as opposed to making queries to construct further queries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNotIndexed indicates the vulnerability being queried has a dist or repo not // indexed into the database. ErrNotIndexed = fmt.Errorf("vulnerability containers data not indexed by any scannners") )
Functions ¶
Types ¶
This section is empty.
Notes ¶
Bugs ¶
TestDatabase closes over the passed-in Context and uses it for the Cleanup method. Because Cleanup functions are earlier in the stack than any defers inside the test, make sure the Context isn't one that's deferred to be cancelled.
Source Files ¶
- affectedmanifest.go
- deletemanifests.go
- digest.go
- distributionsbylayer.go
- doc.go
- generate.go
- indexdistributions.go
- indexmanifest.go
- indexpackage.go
- indexreport.go
- indexrepository.go
- layerscanned.go
- manifestscanned.go
- packagesbylayer.go
- persistmanifest.go
- registerscanners.go
- repositoriesbylayer.go
- setindexfinished.go
- setindexreport.go
- setlayerscanned.go
- store.go
- teststore.go
- valuescan.go