client

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Int

func Int(i int) *int

func String

func String(s string) *string

Types

type BoolValue

type BoolValue bool

func Bool

func Bool(b bool) BoolValue

func (BoolValue) EncodeValues

func (b BoolValue) EncodeValues(key string, v *url.Values) error

type Client

type Client interface {
	ListCVES(ctx context.Context, req *ListCVESReq) (*ListCVESRes, error)
}

func New

func New(apiKey *string) Client

type ListCVESReq

type ListCVESReq struct {
	ResultsPerPage     int       `url:"resultsPerPage"`
	StartIndex         int       `url:"startIndex"`
	CPEName            *string   `url:"cpeName,omitempty"`
	LastModStartDate   *string   `url:"lastModStartDate,omitempty"`
	LastModEndDate     *string   `url:"lastModEndDate,omitempty"`
	PubStartDate       *string   `url:"pubStartDate,omitempty"`
	PubEndDate         *string   `url:"pubEndDate,omitempty"`
	VirtualMatchString *string   `url:"virtualMatchString,omitempty"`
	CVEID              *string   `url:"cveId,omitempty"`
	CVSSV3Metrics      *string   `url:"cvssV3Metrics,omitempty"`
	CVSSV3Severity     *string   `url:"cvssV3Severity,omitempty"`
	CWEID              *string   `url:"cweId,omitempty"`
	HasCertAlerts      BoolValue `url:"hasCertAlerts,omitempty"`
	HasCertNotes       BoolValue `url:"hasCertNotes,omitempty"`
	HasKev             BoolValue `url:"hasKev,omitempty"`
	IsVulnerable       BoolValue `url:"isVulnerable,omitempty"`
	NoRejected         BoolValue `url:"noRejected,omitempty"`
	KeywordSearch      *string   `url:"keywordSearch,omitempty"`
	KeywordExactMatch  BoolValue `url:"keywordExactMatch,omitempty"`
	SourceIdentifier   *string   `url:"sourceIdentifier,omitempty"`
}

type ListCVESRes

type ListCVESRes struct {
	ResultsPerPage  int   `json:"resultsPerPage"`
	StartIndex      int   `json:"startIndex"`
	TotalResults    int   `json:"totalResults"`
	Vulnerabilities []any `json:"vulnerabilities"`
}

Jump to

Keyboard shortcuts

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