Updater

An Updater is responsible for performing run-time fetching and parsing of a security database. The returned vulnerabilities will be written to claircore's database and used in vulnerability matching.

package driver // import "github.com/quay/claircore/libvuln/driver"

type Updater interface {
	Name() string
	Fetcher
	Parser
}
    Updater is an aggregate interface combining the method set of a Fetcher and
    a Parser and forces a Name() to be provided
package driver // import "github.com/quay/claircore/libvuln/driver"

type Updater interface {
	Name() string
	Fetcher
	Parser
}
    Updater is an aggregate interface combining the method set of a Fetcher and
    a Parser and forces a Name() to be provided

package driver // import "github.com/quay/claircore/libvuln/driver"

type Fetcher interface { Fetch(context.Context, Fingerprint) (io.ReadCloser, Fingerprint, error) } Fetcher is an interface which is embedded into the Updater interface.

When called the interface should determine if new security advisory data
is available. Fingerprint may be passed into in order for the Fetcher to
determine if the contents has changed

If there is new content Fetcher should return a io.ReadCloser where the new
content can be read. Optionally a fingerprint can be returned which uniquely
identifies the new content.

If the conent has not change an Unchanged error should be returned.

package driver // import "github.com/quay/claircore/libvuln/driver"

type Updater interface { Name() string Fetcher Parser } Updater is an aggregate interface combining the method set of a Fetcher and a Parser and forces a Name() to be provided

package driver // import "github.com/quay/claircore/libvuln/driver"

type Fetcher interface {
	Fetch(context.Context, Fingerprint) (io.ReadCloser, Fingerprint, error)
}
    Fetcher is an interface which is embedded into the Updater interface.

    When called the interface should determine if new security advisory data
    is available. Fingerprint may be passed into in order for the Fetcher to
    determine if the contents has changed

    If there is new content Fetcher should return a io.ReadCloser where the new
    content can be read. Optionally a fingerprint can be returned which uniquely
    identifies the new content.

    If the conent has not change an Unchanged error should be returned.

package driver // import "github.com/quay/claircore/libvuln/driver"

type Parser interface { // Parse should take an io.ReadCloser, read the contents, parse the contents // into a list of claircore.Vulnerability structs and then return // the list. Parse should assume contents are uncompressed and ready for parsing. Parse(ctx context.Context, contents io.ReadCloser) ([]*claircore.Vulnerability, error) } Parser is an interface which is embedded into the Updater interface.

Parse should be called with an io.ReadCloser struct where the contents
of a security advisory database can be read and parsed into an array of
*claircore.Vulnerability

package driver // import "github.com/quay/claircore/libvuln/driver"

type Updater interface { Name() string Fetcher Parser } Updater is an aggregate interface combining the method set of a Fetcher and a Parser and forces a Name() to be provided

package driver // import "github.com/quay/claircore/libvuln/driver"

type Fetcher interface {
	Fetch(context.Context, Fingerprint) (io.ReadCloser, Fingerprint, error)
}
    Fetcher is an interface which is embedded into the Updater interface.

    When called the interface should determine if new security advisory data
    is available. Fingerprint may be passed into in order for the Fetcher to
    determine if the contents has changed

    If there is new content Fetcher should return a io.ReadCloser where the new
    content can be read. Optionally a fingerprint can be returned which uniquely
    identifies the new content.

    If the conent has not change an Unchanged error should be returned.

package driver // import "github.com/quay/claircore/libvuln/driver"

type Parser interface { // Parse should take an io.ReadCloser, read the contents, parse the contents // into a list of claircore.Vulnerability structs and then return // the list. Parse should assume contents are uncompressed and ready for parsing. Parse(ctx context.Context, contents io.ReadCloser) ([]*claircore.Vulnerability, error) } Parser is an interface which is embedded into the Updater interface.

Parse should be called with an io.ReadCloser struct where the contents
of a security advisory database can be read and parsed into an array of
*claircore.Vulnerability
package driver // import "github.com/quay/claircore/libvuln/driver"

type Fingerprint string
    Fingerprint is some identifying information about a vulnerability database.
```
```
package driver // import "github.com/quay/claircore/libvuln/driver"

type Updater interface {
	Name() string
	Fetcher
	Parser
}
    Updater is an aggregate interface combining the method set of a Fetcher and
    a Parser and forces a Name() to be provided

package driver // import "github.com/quay/claircore/libvuln/driver"

type Fetcher interface { Fetch(context.Context, Fingerprint) (io.ReadCloser, Fingerprint, error) } Fetcher is an interface which is embedded into the Updater interface.

When called the interface should determine if new security advisory data
is available. Fingerprint may be passed into in order for the Fetcher to
determine if the contents has changed

If there is new content Fetcher should return a io.ReadCloser where the new
content can be read. Optionally a fingerprint can be returned which uniquely
identifies the new content.

If the conent has not change an Unchanged error should be returned.
package driver // import "github.com/quay/claircore/libvuln/driver"

type Parser interface {
	// Parse should take an io.ReadCloser, read the contents, parse the contents
	// into a list of claircore.Vulnerability structs and then return
	// the list. Parse should assume contents are uncompressed and ready for parsing.
	Parse(ctx context.Context, contents io.ReadCloser) ([]*claircore.Vulnerability, error)
}
    Parser is an interface which is embedded into the Updater interface.

    Parse should be called with an io.ReadCloser struct where the contents
    of a security advisory database can be read and parsed into an array of
    *claircore.Vulnerability

package driver // import "github.com/quay/claircore/libvuln/driver"

type Fingerprint string Fingerprint is some identifying information about a vulnerability database.

package driver // import "github.com/quay/claircore/libvuln/driver"

type Configurable interface {
	Configure(context.Context, ConfigUnmarshaler, *http.Client) error
}
    Configurable is an interface that Updaters can implement to opt-in to having
    their configuration provided dynamically.
```
```
package driver // import "github.com/quay/claircore/libvuln/driver"

type Updater interface {
	Name() string
	Fetcher
	Parser
}
    Updater is an aggregate interface combining the method set of a Fetcher and
    a Parser and forces a Name() to be provided

package driver // import "github.com/quay/claircore/libvuln/driver"

type Fetcher interface { Fetch(context.Context, Fingerprint) (io.ReadCloser, Fingerprint, error) } Fetcher is an interface which is embedded into the Updater interface.

When called the interface should determine if new security advisory data
is available. Fingerprint may be passed into in order for the Fetcher to
determine if the contents has changed

If there is new content Fetcher should return a io.ReadCloser where the new
content can be read. Optionally a fingerprint can be returned which uniquely
identifies the new content.

If the conent has not change an Unchanged error should be returned.
package driver // import "github.com/quay/claircore/libvuln/driver"

type Parser interface {
	// Parse should take an io.ReadCloser, read the contents, parse the contents
	// into a list of claircore.Vulnerability structs and then return
	// the list. Parse should assume contents are uncompressed and ready for parsing.
	Parse(ctx context.Context, contents io.ReadCloser) ([]*claircore.Vulnerability, error)
}
    Parser is an interface which is embedded into the Updater interface.

    Parse should be called with an io.ReadCloser struct where the contents
    of a security advisory database can be read and parsed into an array of
    *claircore.Vulnerability

package driver // import "github.com/quay/claircore/libvuln/driver"

type Fingerprint string Fingerprint is some identifying information about a vulnerability database.

package driver // import "github.com/quay/claircore/libvuln/driver"

type Configurable interface {
	Configure(context.Context, ConfigUnmarshaler, *http.Client) error
}
    Configurable is an interface that Updaters can implement to opt-in to having
    their configuration provided dynamically.

package driver // import "github.com/quay/claircore/libvuln/driver"

type ConfigUnmarshaler func(interface{}) error ConfigUnmarshaler can be thought of as an Unmarshal function with the byte slice provided, or a Decode function.

The function should populate a passed struct with any configuration
information.