oracle

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2019 License: Apache-2.0 Imports: 14 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 the provided Updater.

func WithClient

func WithClient(c *http.Client) Option

WithClient returns an Option that will make the Updater use the specified http.Client, instead of http.DefaultClient.

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 Updater

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

Updater implements driver.Updater for Oracle Linux.

func NewUpdater

func NewUpdater(year int, opts ...Option) (*Updater, error)

NewUpdater returns an updater configured according to the provided Options.

If year is -1, the "all" database will be pulled.

func (*Updater) Fetch

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

Fetch satifies the driver.Updater interface.

func (*Updater) Name

func (u *Updater) Name() string

Name satifies the driver.Updater interface.

func (*Updater) Parse

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

Parse implements driver.Parser.

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