Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertDescription ¶
type AlertTypes ¶
type Api ¶
type Api struct {
BaseUrl string
AlertTypes AlertTypes
// Endpoints
PollWithAlertsEndpoint string
GetAlertTypesEndpoint string
}
func NewSocketAPI ¶
func (*Api) GetAlerts ¶
func (c *Api) GetAlerts(purl string) ([]PackageInfo, error)
Fetches risk alerts for provided package url (purl) example: api.GetAlerts("pkg:maven/org.dependencytrack/dependency-track@4.1.0")
func (*Api) ProcessComponents ¶
func (c *Api) ProcessComponents(bom *cdx.BOM, workers int) []PackageInfo
func (*Api) ProcessPurls ¶ added in v1.0.1
func (c *Api) ProcessPurls(purls []string, workers int) []PackageInfo
type Capabilities ¶
type PackageInfo ¶
type PackageInfo struct {
ID string `json:"id"`
Type string `json:"type"`
Name string `json:"name"`
Namespace string `json:"namespace"`
Files string `json:"files"`
Version string `json:"version"`
Qualifiers Qualifiers `json:"qualifiers"`
Scores Scores `json:"scores"`
Capabilities Capabilities `json:"capabilities"`
License string `json:"license"`
Size int `json:"size"`
State string `json:"state"`
Alerts []Alert `json:"alerts"`
LicenseDetails []any `json:"licenseDetails"`
}
type Qualifiers ¶
type Qualifiers struct {
Ext string `json:"ext"`
}
type ResAlertTypes ¶
Click to show internal directories.
Click to hide internal directories.