epss

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAPIPartialFail = errors.New("an API request failed")

Functions

func Sort

func Sort(slice []Data, by SortByOption)

func Sprint

func Sprint(data []Data) string

Types

type CVE

type CVE struct {
	ID       string
	Severity string
	Link     string
}

type Data

type Data struct {
	CVE        string `json:"cve"`
	EPSS       string `json:"epss"`
	Percentile string `json:"percentile"`
	Date       string `json:"date"`
	Severity   string `json:"severity,omitempty"`
	URL        string `json:"url,omitempty"`
}

type DataSorter

type DataSorter struct {
	// contains filtered or unexported fields
}

func (*DataSorter) Len

func (s *DataSorter) Len() int

func (*DataSorter) Less

func (s *DataSorter) Less(i, j int) bool

func (*DataSorter) Swap

func (s *DataSorter) Swap(i, j int)

type Service

type Service struct {
	BatchSize int
	Endpoint  string
	// contains filtered or unexported fields
}

func NewEPSSService

func NewEPSSService(c *http.Client, endpoint string) *Service

func (Service) Get

func (s Service) Get(CVEs []CVE) ([]Data, error)

type SortByOption

type SortByOption int
const (
	SortCVE SortByOption = iota
	SortEPSS
	SortPercentile
	SortDate
)

Jump to

Keyboard shortcuts

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