suse

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2020 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 WithLogger

func WithLogger(l *zerolog.Logger) Option

WithLogger sets the default logger.

Functions that take a context.Context will use the logger embedded in there instead of the Logger passed in via this Option.

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 SUSE release OVAL database to pull from.

const (
	EnterpriseServer15  Release = `suse.linux.enterprise.server.15`
	EnterpriseDesktop15 Release = `suse.linux.enterprise.desktop.15`
	Enterprise15        Release = `suse.linux.enterprise.15`
	EnterpriseServer12  Release = `suse.linux.enterprise.server.12`
	EnterpriseDesktop12 Release = `suse.linux.enterprise.desktop.12`
	Enterprise12        Release = `suse.linux.enterprise.12`
	EnterpriseServer11  Release = `suse.linux.enterprise.server.11`
	EnterpriseDesktop11 Release = `suse.linux.enterprise.desktop.11`
	OpenStackCloud9     Release = `suse.openstack.cloud.9`
	OpenStackCloud8     Release = `suse.openstack.cloud.8`
	OpenStackCloud7     Release = `suse.openstack.cloud.7`
	Leap151             Release = `opensuse.leap.15.1`
	Leap150             Release = `opensuse.leap.15.0`
	Leap423             Release = `opensuse.leap.42.3`
)

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

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

ParseContext is like Parse, but with context.

Jump to

Keyboard shortcuts

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