Documentation ¶
Index ¶
- type CommonEntry
- type Entry
- type Loader
- type Store
- func (s *Store) DeleteUpdateOperations(context.Context, ...uuid.UUID) (int64, error)
- func (s *Store) Entries() map[uuid.UUID]*Entry
- func (s *Store) GC(_ context.Context, _ int) (int64, error)
- func (s *Store) GetLatestUpdateRef(_ context.Context, k driver.UpdateKind) (uuid.UUID, error)
- func (s *Store) GetLatestUpdateRefs(_ context.Context, k 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(_ context.Context, k driver.UpdateKind, us ...string) (map[string][]driver.UpdateOperation, error)
- func (s *Store) Initialized(context.Context) (bool, error)
- func (s *Store) Store(w io.Writer) error
- func (s *Store) UpdateEnrichments(ctx context.Context, kind string, fp driver.Fingerprint, ...) (uuid.UUID, error)
- func (s *Store) UpdateVulnerabilities(_ context.Context, updater string, fingerprint driver.Fingerprint, ...) (uuid.UUID, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonEntry ¶
type CommonEntry struct { Updater string Fingerprint driver.Fingerprint Date time.Time }
CommonEntry is an embedded type that's shared between the "normal" Entry type and the on-disk json produced by a Store's Load method.
type Entry ¶
type Entry struct { CommonEntry Vuln []*claircore.Vulnerability Enrichment []driver.EnrichmentRecord }
Entry is a record of all information needed to record a vulnerability at a later date.
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader is an iterator struct that returns Entries.
Users should call Next until it reports false, then check for errors via Err.
type Store ¶
A Store buffers update operations.
func (*Store) DeleteUpdateOperations ¶
DeleteUpdateOperations is unimplemented.
func (*Store) Entries ¶
Entries returns a map containing all the Entries stored by calls to UpdateVulnerabilities.
It is unsafe for modification because it does not return a copy of the map.
func (*Store) GetLatestUpdateRef ¶
GetLatestUpdateRef reports the latest update reference of any known updater.
func (*Store) GetLatestUpdateRefs ¶
func (s *Store) GetLatestUpdateRefs(_ context.Context, k driver.UpdateKind) (map[string][]driver.UpdateOperation, error)
GetLatestUpdateRefs reports the latest update reference for every known updater.
func (*Store) GetUpdateDiff ¶
GetUpdateDiff is unimplemented.
func (*Store) GetUpdateOperations ¶
func (s *Store) GetUpdateOperations(_ context.Context, k driver.UpdateKind, us ...string) (map[string][]driver.UpdateOperation, error)
GetUpdateOperations returns a list of UpdateOperations in date descending order for the given updaters.
The returned map is keyed by Updater implementation's unique names.
If no updaters are specified, all UpdateOperations are returned.
func (*Store) Initialized ¶ added in v0.3.0
Initialized implements vulnstore.Updater.
func (*Store) UpdateEnrichments ¶ added in v0.5.0
func (s *Store) UpdateEnrichments(ctx context.Context, kind string, fp driver.Fingerprint, es []driver.EnrichmentRecord) (uuid.UUID, error)
UpdateEnrichments creates a new EnrichmentUpdateOperation, inserts the provided EnrichmentRecord(s), and ensures enrichments from previous updates are not queries by clients.
func (*Store) UpdateVulnerabilities ¶
func (s *Store) UpdateVulnerabilities(_ context.Context, updater string, fingerprint driver.Fingerprint, vulns []*claircore.Vulnerability) (uuid.UUID, error)
UpdateVulnerabilities records all provided vulnerabilities.