photon

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2020 License: Apache-2.0 Imports: 15 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DistributionScanner

type DistributionScanner struct{}

DistributionScanner attempts to discover if a layer displays characteristics of a photon distribution

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 will inspect the layer for an os-release or lsb-release file and perform a regex match for keywords indicating the associated photon release

If neither file is found a (nil,nil) is returned. If the files are found but all regexp fail to match an empty distribution is returned.

func (*DistributionScanner) Version

func (*DistributionScanner) Version() string

Version implements scanner.VersionedScanner.

type Option

type Option func(*Updater) error

Option configures an Updater.

func WithClient

func WithClient(c *http.Client) Option

WithClient sets an http.Client for use with an Updater.

If this Option is not supplied, http.DefaultClient will be used.

func WithURL

func WithURL(uri, compression string) Option

WithURL overrides the default URL to fetch an OVAL database.

type Release

type Release string

Release indicates the Photon release OVAL database to pull from.

const (
	Photon1 Release = `photon1`
	Photon2 Release = `photon2`
	Photon3 Release = `photon3`
)

These are some known Releases.

type Updater

type Updater struct {
	ovalutil.Fetcher // promoted Fetch method
	// contains filtered or unexported fields
}

Updater implements driver.Updater for Photon.

func NewUpdater

func NewUpdater(r Release, opts ...Option) (*Updater, error)

NewUpdater configures an updater to fetch the specified Release.

func (*Updater) Name

func (u *Updater) Name() string

Name satisfies driver.Updater.

func (*Updater) Parse

Jump to

Keyboard shortcuts

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