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 ¶
Option controls the configuration of an Updater.
func WithClient ¶
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.
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 ¶
NewUpdater returns a configured Updater or reports an error.
func (*Updater) Fetch ¶
func (u *Updater) Fetch(ctx context.Context, hint driver.Fingerprint) (io.ReadCloser, driver.Fingerprint, error)
Fetch implements driver.Updater.
func (*Updater) Parse ¶
func (u *Updater) Parse(ctx context.Context, r io.ReadCloser) ([]*claircore.Vulnerability, error)
Parse implements driver.Updater.