Documentation ¶
Overview ¶
Package client provides an interface for accessing vulnerability databases, via either HTTP or local filesystem access.
The protocol is described at https://go.dev/security/vuln/database.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
A Client for reading vulnerability databases.
func NewClient ¶
NewClient returns a client that reads the vulnerability database in source (an "http" or "file" prefixed URL).
It supports databases following the API described in https://go.dev/security/vuln/database#api.
func (*Client) ByModules ¶
func (c *Client) ByModules(ctx context.Context, reqs []*ModuleRequest) (_ []*ModuleResponse, err error)
ByModules returns a list of responses containing the OSV entries corresponding to each request.
The order of the requests is preserved, and each request has a response even if there are no entries (in which case the Entries field is nil).