Documentation ¶
Index ¶
- type Alert
- type Library
- type Product
- type Project
- type Request
- type System
- func (s *System) GetMetaInfoForProduct(productName string) (Product, error)
- func (s *System) GetOrganizationProductVitals() ([]Product, error)
- func (s *System) GetProductByName(productName string) (*Product, error)
- func (s *System) GetProductName(productToken string) (string, error)
- func (s *System) GetProductsMetaInfo() ([]Product, error)
- func (s *System) GetProjectAlerts(projectToken string) ([]Alert, error)
- func (s *System) GetProjectByName(productToken, projectName string) (*Project, error)
- func (s *System) GetProjectLibraryLocations(projectToken string) ([]Library, error)
- func (s *System) GetProjectRiskReport(projectToken string) ([]byte, error)
- func (s *System) GetProjectToken(productToken, projectName string) (string, error)
- func (s *System) GetProjectTokens(productToken string, projectNames []string) ([]string, error)
- func (s *System) GetProjectVitals(projectToken string) (*Project, error)
- func (s *System) GetProjectVulnerabilityReport(projectToken string, format string) ([]byte, error)
- func (s *System) GetProjectsByIDs(productToken string, projectIDs []int64) ([]Project, error)
- func (s *System) GetProjectsMetaInfo(productToken string) ([]Project, error)
- type Vulnerability
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alert ¶ added in v1.51.0
type Alert struct { Vulnerability Vulnerability `json:"vulnerability"` Library Library `json:"library,omitempty"` Project string `json:"project,omitempty"` CreationDate string `json:"creation_date,omitempty"` }
Alert
type Library ¶ added in v1.51.0
type Library struct { Name string `json:"name,omitempty"` Filename string `json:"filename,omitempty"` Version string `json:"version,omitempty"` Project string `json:"project,omitempty"` }
Library
type Product ¶
type Product struct { Name string `json:"name"` Token string `json:"token"` CreationDate string `json:"creationDate,omitempty"` LastUpdateDate string `json:"lastUpdatedDate,omitempty"` }
Product defines a WhiteSource product with name and token
type Project ¶
type Project struct { ID int64 `json:"id"` Name string `json:"name"` PluginName string `json:"pluginName"` Token string `json:"token"` UploadedBy string `json:"uploadedBy"` CreationDate string `json:"creationDate,omitempty"` LastUpdateDate string `json:"lastUpdatedDate,omitempty"` }
Project defines a WhiteSource project with name and token
type Request ¶
type Request struct { RequestType string `json:"requestType,omitempty"` UserKey string `json:"userKey,omitempty"` ProductToken string `json:"productToken,omitempty"` ProductName string `json:"productName,omitempty"` ProjectToken string `json:"projectToken,omitempty"` OrgToken string `json:"orgToken,omitempty"` Format string `json:"format,omitempty"` }
Request defines a request object to be sent to the WhiteSource system
type System ¶
type System struct { HTTPClient piperhttp.Sender OrgToken string ServerURL string UserToken string }
System defines a WhiteSource system including respective tokens (e.g. org token, user token)
func (*System) GetMetaInfoForProduct ¶
GetMetaInfoForProduct retrieves meta information for a specific WhiteSource product
func (*System) GetOrganizationProductVitals ¶ added in v1.51.0
GetOrganizationProductVitals
func (*System) GetProductByName ¶ added in v1.51.0
GetProductByName
func (*System) GetProductName ¶
GetProductName returns the product name for a given product token
func (*System) GetProductsMetaInfo ¶
GetProductsMetaInfo retrieves meta information for all WhiteSource products a user has access to
func (*System) GetProjectAlerts ¶ added in v1.51.0
GetProjectAlerts
func (*System) GetProjectByName ¶ added in v1.51.0
GetProjectByName returns the finds and returns a project by name
func (*System) GetProjectLibraryLocations ¶ added in v1.51.0
GetProjectLibraryLocations
func (*System) GetProjectRiskReport ¶ added in v1.51.0
GetProjectRiskReport
func (*System) GetProjectToken ¶
GetProjectToken returns the project token for a project with a given name
func (*System) GetProjectTokens ¶
GetProjectTokens returns the project tokens matching a given a slice of project names
func (*System) GetProjectVitals ¶ added in v1.51.0
GetProjectVitals returns project meta info given a project token
func (*System) GetProjectVulnerabilityReport ¶ added in v1.51.0
GetProjectVulnerabilityReport
func (*System) GetProjectsByIDs ¶ added in v1.51.0
GetProjectsByIDs: get all project tokens given a list of project ids
type Vulnerability ¶ added in v1.51.0
type Vulnerability struct { Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Level string `json:"level,omitempty"` Description string `json:"description,omitempty"` Severity string `json:"severity,omitempty"` CVSS3Severity string `json:"cvss3_severity,omitempty"` CVSS3Score float64 `json:"cvss3_score,omitempty"` Score float64 `json:"score,omitempty"` FixResolutionText string `json:"fixResolutionText,omitempty"` PublishDate string `json:"publishDate,omitempty"` }
Vulnerability