ubuntu

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

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

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

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

NewFactory constructs a Factory.

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

func (*Factory) Configure

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

Configure implements driver.Configurable.

func (*Factory) UpdaterSet

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

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) Name

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

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