Documentation ¶
Index ¶
- func TestDB(ctx context.Context, t testing.TB) *pgxpool.Pool
- type Store
- func (s *Store) DeleteUpdateOperations(ctx context.Context, id ...uuid.UUID) (int64, error)
- func (s *Store) GC(ctx context.Context, keep int) (int64, error)
- func (s *Store) Get(ctx context.Context, records []*claircore.IndexRecord, opts vulnstore.GetOpts) (map[string][]*claircore.Vulnerability, error)
- func (s *Store) GetLatestUpdateRef(ctx context.Context, kind driver.UpdateKind) (uuid.UUID, error)
- func (s *Store) GetLatestUpdateRefs(ctx context.Context, kind driver.UpdateKind) (map[string][]driver.UpdateOperation, error)
- func (s *Store) GetUpdateDiff(ctx context.Context, prev, cur uuid.UUID) (*driver.UpdateDiff, error)
- func (s *Store) GetUpdateOperations(ctx context.Context, kind driver.UpdateKind, updater ...string) (map[string][]driver.UpdateOperation, error)
- func (s *Store) Initialized(ctx context.Context) (bool, error)
- func (s *Store) UpdateVulnerabilities(ctx context.Context, updater string, fingerprint driver.Fingerprint, ...) (uuid.UUID, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
store implements all interfaces in the vulnstore package
func NewVulnStore ¶
func (*Store) DeleteUpdateOperations ¶ added in v0.0.18
DeleteUpdateOperations implements vulnstore.Updater.
func (*Store) GC ¶ added in v0.2.0
GC is split into two phases, first it will identify any update operations which are older then the provided keep value and delete these.
Next it will perform chunked deletions of any vulns from the vuln table which are not longer referenced by update operations.
The GC is throttled to not overload the database with cascade deletes. If a full GC is required run this method until the returned int64 value is 0.
func (*Store) Get ¶
func (s *Store) Get(ctx context.Context, records []*claircore.IndexRecord, opts vulnstore.GetOpts) (map[string][]*claircore.Vulnerability, error)
Get implements vulnstore.Vulnerability.
func (*Store) GetLatestUpdateRef ¶ added in v0.0.18
GetLatestUpdateRef implements driver.Updater.
func (*Store) GetLatestUpdateRefs ¶ added in v0.0.18
func (s *Store) GetLatestUpdateRefs(ctx context.Context, kind driver.UpdateKind) (map[string][]driver.UpdateOperation, error)
func (*Store) GetUpdateDiff ¶ added in v0.0.18
func (*Store) GetUpdateOperations ¶ added in v0.0.18
func (s *Store) GetUpdateOperations(ctx context.Context, kind driver.UpdateKind, updater ...string) (map[string][]driver.UpdateOperation, error)
func (*Store) Initialized ¶ added in v0.3.0
func (*Store) UpdateVulnerabilities ¶ added in v0.0.18
func (s *Store) UpdateVulnerabilities(ctx context.Context, updater string, fingerprint driver.Fingerprint, vulns []*claircore.Vulnerability) (uuid.UUID, error)
UpdateVulnerabilities implements vulnstore.Updater.