ubuntu

package
v1.5.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 26 Imported by: 4

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 added in v0.0.14

type DistributionScanner struct{}

DistributionScanner implements indexer.DistributionScanner looking for Ubuntu distributions.

func (*DistributionScanner) Kind added in v0.0.14

func (*DistributionScanner) Kind() string

Kind implements [scanner.VersionedScanner].

func (*DistributionScanner) Name added in v0.0.14

func (*DistributionScanner) Name() string

Name implements [scanner.VersionedScanner].

func (*DistributionScanner) Scan added in v0.0.14

Scan implements indexer.DistributionScanner.

func (*DistributionScanner) Version added in v0.0.14

func (*DistributionScanner) Version() string

Version implements [scanner.VersionedScanner].

type Factory added in v0.1.0

type Factory struct {
	// contains filtered or unexported fields
}

Factory implements driver.UpdaterSetFactory.

[Configure] must be called before [UpdaterSet].

func NewFactory added in v1.4.5

func NewFactory(ctx context.Context) (*Factory, error)

NewFactory constructs a Factory.

The returned Factory must have [Configure] called before [UpdaterSet].

func (*Factory) Configure added in v0.4.2

func (f *Factory) Configure(ctx context.Context, cf driver.ConfigUnmarshaler, c *http.Client) error

Configure implements driver.Configurable.

func (*Factory) UpdaterSet added in v0.1.0

func (f *Factory) UpdaterSet(ctx context.Context) (driver.UpdaterSet, error)

UpdaterSet implements driver.UpdaterSetFactory

type FactoryConfig added in v1.4.5

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) Name added in v0.0.8

func (*Matcher) Name() string

Name 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 added in v0.4.2

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".

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL