Documentation ¶
Overview ¶
Package ubuntu implements machinery for indexing and matching ubuntu containers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DistributionScanner ¶
type DistributionScanner struct{}
DistributionScanner implements indexer.DistributionScanner looking for Ubuntu distributions.
func (*DistributionScanner) Kind ¶
func (*DistributionScanner) Kind() string
Kind implements [scanner.VersionedScanner].
func (*DistributionScanner) Name ¶
func (*DistributionScanner) Name() string
Name implements [scanner.VersionedScanner].
func (*DistributionScanner) Scan ¶
func (ds *DistributionScanner) Scan(ctx context.Context, l *claircore.Layer) ([]*claircore.Distribution, error)
Scan implements indexer.DistributionScanner.
func (*DistributionScanner) Version ¶
func (*DistributionScanner) Version() string
Version implements [scanner.VersionedScanner].
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory implements driver.UpdaterSetFactory.
[Configure] must be called before [UpdaterSet].
func NewFactory ¶
NewFactory constructs a Factory.
The returned Factory must have [Configure] called before [UpdaterSet].
func (*Factory) Configure ¶
Configure implements driver.Configurable.
func (*Factory) UpdaterSet ¶
UpdaterSet implements driver.UpdaterSetFactory
type FactoryConfig ¶
type FactoryConfig struct { // URL should be the address of a [Launchpad API] server. // // [Launchpad API]: https://launchpad.net/+apidoc/1.0.html URL string `json:"url" yaml:"url"` // Name is the distribution name, as used in talking to the Launchpad API. Name string `json:"name" yaml:"name"` // Force is a list of name, version pairs to put in the resulting UpdaterSet regardless // of their existence or "active" status in the API response. The resulting Updaters // will have guesses at reasonable settings, but the individual Updater's configuration // should be used to ensure correct parameters. // // For example, the name, version pair for Ubuntu 20.04 would be "focal", "20.04". Force []struct { Name string `json:"name" yaml:"name"` Version string `json:"version" yaml:"version"` } }
FactoryConfig is the configuration for Factories.
type Matcher ¶
type Matcher struct{}
Matcher is a driver.Matcher for Ubuntu distributions.
func (*Matcher) Filter ¶
func (*Matcher) Filter(record *claircore.IndexRecord) bool
Filter implements driver.Matcher.
func (*Matcher) Query ¶
func (*Matcher) Query() []driver.MatchConstraint
Query implements driver.Matcher.
func (*Matcher) Vulnerable ¶
func (*Matcher) Vulnerable(ctx context.Context, record *claircore.IndexRecord, vuln *claircore.Vulnerability) (bool, error)
Vulnerable implements driver.Matcher.
type UpdaterConfig ¶
type UpdaterConfig struct { URL string `json:"url" yaml:"url"` UseBzip2 *bool `json:"use_bzip2" yaml:"use_bzip2"` }
UpdaterConfig is the configuration for the updater.
By convention, this is in a map called "ubuntu/updater/${RELEASE}", e.g. "ubuntu/updater/focal".