pyupio

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: 16 Imported by: 0

Documentation

Overview

Package pyupio provides an updater for importing pyup vulnerability information.

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 controls the configuration of an Updater.

func WithClient

func WithClient(c *http.Client) Option

WithClient sets the http.Client that the updater should use for requests.

If not passed to NewUpdater, http.DefaultClient will be used.

func WithRepo

func WithRepo(r *claircore.Repository) Option

WithRepo sets the repository information that will be associated with all the vulnerabilites found.

If not passed to NewUpdater, a default Repository will be used.

func WithURL

func WithURL(uri string) Option

WithURL sets the URL the updater should fetch.

The URL should point to a gzip compressed tarball containing a properly formatted json object in a file named `insecure_full.json`.

If not passed to NewUpdater, the master branch of github.com/pyupio/safety-db will be fetched.

type Updater

type Updater struct {
	// contains filtered or unexported fields
}

Updater reads a pyup formatted json database for vulnerabilities.

The zero value is not safe to use.

func NewUpdater

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

NewUpdater returns a configured Updater or reports an error.

func (*Updater) Fetch

Fetch implements driver.Updater.

func (*Updater) Name

func (*Updater) Name() string

Name implements driver.Updater.

func (*Updater) Parse

Parse implements driver.Updater.

Jump to

Keyboard shortcuts

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