rhel

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: Apache-2.0 Imports: 11 Imported by: 5

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 is a type to configure 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 int
const (
	RHEL3 Release = 3
	RHEL4 Release = 4
	RHEL5 Release = 5
	RHEL6 Release = 6
	RHEL7 Release = 7
	RHEL8 Release = 8
)

type Updater

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

Updater fetches and parses RHEL-flavored OVAL databases.

func NewUpdater

func NewUpdater(v Release, opt ...Option) (*Updater, error)

NewUpdater returns an Updater.

func (*Updater) Fetch

func (u *Updater) Fetch() (io.ReadCloser, string, error)

Fetch satisifies the driver.Updater interface.

func (*Updater) Name

func (u *Updater) Name() string

Name satisifies the driver.Updater interface.

func (*Updater) Parse

func (u *Updater) Parse(r io.ReadCloser) ([]*claircore.Vulnerability, error)

Parse satisifies the driver.Updater interface.

func (*Updater) ParseContext

func (u *Updater) ParseContext(ctx context.Context, r io.ReadCloser) ([]*claircore.Vulnerability, error)

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