Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Links ¶
func Links(def oval.Definition) string
Links joins all the links in the cve definition into a single string.
Types ¶
type Compressor ¶
type Compressor uint
Compressor is used by Fetcher to decompress data it fetches.
const ( CompressionNone Compressor = iota // none CompressionGzip // gzip CompressionBzip2 // bzip2 )
These are the kinds of Compession a Fetcher can deal with.
func ParseCompressor ¶
func ParseCompressor(s string) (c Compressor, err error)
ParseCompressor reports the Compressor indicated by the passed in string.
func (Compressor) String ¶
func (i Compressor) String() string
type Fetcher ¶
type Fetcher struct { Compression Compressor URL *url.URL Client *http.Client }
Fetcher implements the driver.FetcherNG interface.
Fetcher expects all of its exported members to be filled out appropriately, and may panic if not.
func (*Fetcher) Fetch ¶ added in v0.0.8
func (f *Fetcher) Fetch(ctx context.Context, hint driver.Fingerprint) (io.ReadCloser, driver.Fingerprint, error)
Fetch fetches the resource as specified by Fetcher.URL and Fetcher.Compression, using the client provided as Fetcher.Client.
Fetch makes GET requests, and will make conditional requests using the passed-in hint as an HTTP date. The returned hint will be an HTTP date if the server sends a Last-Modified header.
Tmp.File is used to return a ReadCloser that outlives the passed-in context.
type RPMInfo ¶
type RPMInfo struct {
// contains filtered or unexported fields
}
RPMInfo holds information for extracting Vulnerabilities from an OVAL database with rpm_info states, objects, and tests.
func NewRPMInfo ¶
NewRPMInfo creates an RPMInfo ready to examine the passed-in OVAL database.