Documentation
¶
Overview ¶
Package libvuln is a generated GoMock package.
Index ¶
- Constants
- type Libvuln
- func (l *Libvuln) DeleteUpdateOperations(ctx context.Context, ref ...uuid.UUID) error
- func (l *Libvuln) LatestUpdateOperation(ctx context.Context) (uuid.UUID, error)
- func (l *Libvuln) LatestUpdateOperations(ctx context.Context) (map[string]uuid.UUID, error)
- func (l *Libvuln) Scan(ctx context.Context, ir *claircore.IndexReport) (*claircore.VulnerabilityReport, error)
- func (l *Libvuln) UpdateDiff(ctx context.Context, prev, cur uuid.UUID) (*driver.UpdateDiff, error)
- func (l *Libvuln) UpdateOperations(ctx context.Context, updaters ...string) (map[string][]driver.UpdateOperation, error)
- type MockLibvuln
- type MockLibvulnMockRecorder
- type Opts
Constants ¶
const ( DefaultUpdateInterval = 30 * time.Minute DefaultUpdaterInitConcurrency = 10 DefaultMaxConnPool = 50 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Libvuln ¶
type Libvuln struct {
// contains filtered or unexported fields
}
Libvuln exports methods for scanning an IndexReport and created a VulnerabilityReport.
Libvuln also runs background updaters which keep the vulnerability database consistent.
func (*Libvuln) DeleteUpdateOperations ¶ added in v0.0.18
DeleteUpdateOperations removes one or more update operations and their associated vulnerabilities from the vulnerability database.
func (*Libvuln) LatestUpdateOperation ¶ added in v0.0.18
LatestUpdateOperation returns a reference to the latest known update.
This can be used by clients to determine if a call to Scan is likely to return new results.
func (*Libvuln) LatestUpdateOperations ¶ added in v0.0.18
LatestUpdateOperations returns references for the latest update for every known updater.
These references are okay to expose externally.
func (*Libvuln) Scan ¶
func (l *Libvuln) Scan(ctx context.Context, ir *claircore.IndexReport) (*claircore.VulnerabilityReport, error)
Scan creates a VulnerabilityReport given a manifest's IndexReport.
func (*Libvuln) UpdateDiff ¶ added in v0.0.18
UpdateDiff returns an UpdateDiff describing the changes between prev and cur.
func (*Libvuln) UpdateOperations ¶ added in v0.0.18
func (l *Libvuln) UpdateOperations(ctx context.Context, updaters ...string) (map[string][]driver.UpdateOperation, error)
UpdateOperations returns UpdateOperations in date descending order keyed by the Updater name
type MockLibvuln ¶
type MockLibvuln struct {
// contains filtered or unexported fields
}
MockLibvuln is a mock of Libvuln interface
func NewMockLibvuln ¶
func NewMockLibvuln(ctrl *gomock.Controller) *MockLibvuln
NewMockLibvuln creates a new mock instance
func (*MockLibvuln) EXPECT ¶
func (m *MockLibvuln) EXPECT() *MockLibvulnMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockLibvuln) Scan ¶
func (m *MockLibvuln) Scan(arg0 context.Context, arg1 *claircore.IndexReport) (*claircore.VulnerabilityReport, error)
Scan mocks base method
type MockLibvulnMockRecorder ¶
type MockLibvulnMockRecorder struct {
// contains filtered or unexported fields
}
MockLibvulnMockRecorder is the mock recorder for MockLibvuln
func (*MockLibvulnMockRecorder) Scan ¶
func (mr *MockLibvulnMockRecorder) Scan(arg0, arg1 interface{}) *gomock.Call
Scan indicates an expected call of Scan
type Opts ¶
type Opts struct {
// The maximum number of database connections in the
// connection pool.
MaxConnPool int32
// A connection string to the database Lbvuln will use.
ConnString string
// An interval on which Libvuln will check for new security
// database updates.
UpdateInterval time.Duration
// Determines if Livuln will manage database migrations
Migrations bool
// A pointer to a slice of strings representing which
// updaters libvuln will create.
//
// If nil all default UpdaterSets will be used
//
// The following sets are supported:
// "alpine"
// "aws"
// "debian"
// "oracle"
// "photon"
// "pyupio"
// "rhel"
// "suse"
// "ubuntu"
UpdaterSets []string
// A list of out-of-tree updaters to run.
//
// This list will be merged with any defined UpdaterSets.
//
// If you desire no updaters to run do not add an updater
// into this slice.
Updaters []driver.Updater
// A list of out-of-tree matchers you'd like libvuln to
// use.
//
// This list will me merged with the default matchers.
Matchers []driver.Matcher
}