Documentation ¶
Index ¶
- Constants
- func AddParameters(urlBase string, params map[string]string) string
- func BuildUrl(urlBase string, api string) string
- func GetMimeType(v interface{}) string
- func GetMimeTypeFromTag(v interface{}) string
- func ParameterString(params URLParameters) string
- type ApiToken
- type ApiTokenList
- type ApiTokenWithMeta
- type BomActivityData
- type BomComponent
- type BomComponentList
- type BomComponentOrigin
- type BomComponentPolicyRule
- type BomComponentPolicyRulesList
- type BomComponentPolicyStatus
- type BomReviewDetails
- type BomReviewingUser
- type BomRiskProfile
- type BomRiskProfileItem
- type BomVulnerableComponent
- type BomVulnerableComponentList
- type CVSS
- type CodeLocation
- type CodeLocationList
- type CommonConsequence
- type ComplexLicense
- type Component
- type ComponentLicense
- type ComponentList
- type ComponentProjectReference
- type ComponentProjectReferenceList
- type ComponentRemediation
- type ComponentRequest
- type ComponentUpgradeGuidance
- type ComponentVariant
- type ComponentVersion
- type ComponentVersionList
- type ComponentVersionOrigin
- type ComponentVersionOriginList
- type ComponentVulnerability
- type CreateApiTokenResponse
- type CurrentUserResponse
- type CurrentVersion
- type CweDetails
- type DetectURI
- type Expression
- type ExpressionParameter
- type ExternalExtension
- type GetListOptions
- type HasMimeType
- type HealthCheckStatus
- type ItemsListBase
- type License
- type LicenseDetails
- type Meta
- type Policy
- type PolicyExpression
- type PolicyRule
- type PolicyRuleList
- type PolicyRuleRequest
- type PolicyViolationDetails
- type Project
- type ProjectList
- type ProjectRequest
- type ProjectVersion
- func (v *ProjectVersion) GetCodeLocationsLink() (*ResourceLink, error)
- func (v *ProjectVersion) GetComponentsLink() (*ResourceLink, error)
- func (ProjectVersion) GetMimeType() string
- func (v *ProjectVersion) GetProjectLink() (*ResourceLink, error)
- func (v *ProjectVersion) GetProjectVersionPolicyStatusLink() (*ResourceLink, error)
- func (v *ProjectVersion) GetProjectVersionRiskProfileLink() (*ResourceLink, error)
- func (v *ProjectVersion) GetVulnerableComponentsLink() (*ResourceLink, error)
- type ProjectVersionList
- type ProjectVersionPolicyStatus
- type ProjectVersionRequest
- type ProjectVersionRiskProfile
- type RapidScanComponent
- type RapidScanResult
- type RemediationInfo
- type ResourceLink
- type Risk
- type ScanSummary
- type ScanSummaryList
- type SsoStatus
- type StatusCount
- type TotalCountable
- type Type
- type URLParameters
- type UpgradeGuidance
- type UpgradeSuggestion
- type User
- type UserAssignmentRequest
- type UserList
- type UserRequest
- type VulnerabilitiesList
- type Vulnerability
- type VulnerabilityMetrics
- type VulnerabilityRisk
- type VulnerabilityWithRemediation
Constants ¶
const ( ContentTypeBdComponentDetailV4 = "application/vnd.blackducksoftware.component-detail-4+json" ContentTypeBdComponentDetailV5 = "application/vnd.blackducksoftware.component-detail-5+json" )
const ( ProjectVersionPhasePlanning = "PLANNING" ProjectVersionPhaseDevelopment = "DEVELOPMENT" ProjectVersionPhaseReleased = "RELEASED" ProjectVersionPhaseDeprecated = "DEPRECATED" ProjectVersionPhaseArchived = "ARCHIVED" )
const ( ProjectVersionDistributionExternal = "EXTERNAL" ProjectVersionDistributionSaaS = "SAAS" ProjectVersionDistributionInternal = "INTERNAL" ProjectVersionDistributionOpenSource = "OPENSOURCE" )
const ( ContentTypeRapidScanRequest = "application/vnd.blackducksoftware.developer-scan-1-ld-2+json" ContentTypeRapidScanResults = "application/vnd.blackducksoftware.scan-5+json" )
const ( AuthenticateApi = "/api/tokens/authenticate" CodeLocationsApi = "/api/codelocations" ComponentsApi = "/api/components" CurrentUserApi = "/api/current-user" CurrentUserTokensApi = "/api/current-user/tokens" CurrentVersionApi = "/api/current-version" DetectUriApi = "/api/external-config/detect-uri" PolicyRulesApi = "/api/policy-rules" ProjectsApi = "/api/projects" DeveloperScansApi = "/api/developer-scans" SsoStatusApi = "/api/sso/status" UsersApi = "/api/users" VulnerabilitiesApi = "/api/vulnerabilities" ReadinessApi = "/api/health-checks/readiness" LivenessApi = "/api/health-checks/liveness" FullResultsApi = "/full-result" SecurityApi = "/j_spring_security_check" RemediatingApi = "/remediating" UpgradeGuidanceApi = "/upgrade-guidance" )
const ContentTypeBdAdminV4 = "application/vnd.blackducksoftware.admin-4+json"
const ContentTypeBdBomV6 = "application/vnd.blackducksoftware.bill-of-materials-6+json"
const ContentTypeBdPolicyV5 = "application/vnd.blackducksoftware.policy-5+json"
const ContentTypeBdProjectDetailV4 = "application/vnd.blackducksoftware.project-detail-4+json"
const ContentTypeBdProjectDetailV5 = "application/vnd.blackducksoftware.project-detail-5+json"
const ContentTypeBdVulnerabilityV4 = "application/vnd.blackducksoftware.vulnerability-4+json"
const (
ContentTypeExtensionJSON = "application/vnd.blackducksoftware.externalextension-1+json"
)
const ContentTypeHealthStatus = "application/vnd.blackducksoftware.status-4+json"
Variables ¶
This section is empty.
Functions ¶
func AddParameters ¶ added in v0.9.7
func GetMimeType ¶ added in v0.9.5
func GetMimeType(v interface{}) string
GetMimeType extracts a MIME type for the "Accept" header for requests The ways to embed a mime type First method type bdJsonCoolV7 struct {} func (bdJsonV7) GetMimeType() string { return "application/vnd.blackducksoftware.cool-7+json" }
type SomeTypeWeRetrieve struct { bdJsonCoolV7 ... // rest of the fields }
2.
type bdJsonHackyCoolV4 struct { __mimetype struct{} `mimetype:"application/vnd.blackducksoftware.hackycool-4+json"` }
type SomeTypeWeRetrieve struct { bdJsonHackyCoolV4 ... // rest of the fields }
3. use both :) Note: known so far are
"application/vnd.blackducksoftware.admin-4+json", "application/vnd.blackducksoftware.bill-of-materials-4+json", "application/vnd.blackducksoftware.bill-of-materials-5+json", "application/vnd.blackducksoftware.bill-of-materials-6+json", "application/vnd.blackducksoftware.component-detail-4+json", "application/vnd.blackducksoftware.component-detail-5+json", "application/vnd.blackducksoftware.journal-4+json", "application/vnd.blackducksoftware.notification-4+json", "application/vnd.blackducksoftware.policy-4+json", "application/vnd.blackducksoftware.policy-5+json", "application/vnd.blackducksoftware.project-detail-4+json", "application/vnd.blackducksoftware.project-detail-5+json", "application/vnd.blackducksoftware.report-4+json", "application/vnd.blackducksoftware.scan-4+json", "application/vnd.blackducksoftware.status-4+json", "application/vnd.blackducksoftware.user-4+json", "application/vnd.blackducksoftware.vulnerability-4+json",
func GetMimeTypeFromTag ¶ added in v0.9.5
func GetMimeTypeFromTag(v interface{}) string
func ParameterString ¶
func ParameterString(params URLParameters) string
ParameterString takes a URLParameters object and converts it to a string which can be added to a URL. The resulting string starts from "?" if there were any parameters. If params was empty, it will return an empty string
Types ¶
type ApiTokenList ¶ added in v0.9.5
type ApiTokenList struct { ItemsListBase Items []ApiTokenWithMeta `json:"items"` }
type ApiTokenWithMeta ¶ added in v0.9.5
type BomActivityData ¶
type BomActivityData struct { ContributorCount int `json:"contributorCount12Month"` CommitCount int `json:"commitCount12Month"` LastCommitDate *time.Time `json:"lastCommitDate"` Trend string `json:"trending"` // [DECREASING, STABLE, INCREASING, UNKNOWN] NewerReleases *int `json:"newerReleases,omitempty"` }
type BomComponent ¶
type BomComponent struct { ComponentName string `json:"componentName"` ComponentVersionName string `json:"componentVersionName,omitempty"` Component string `json:"component"` ComponentVersion string `json:"componentVersion,omitempty"` ComponentPurpose string `json:"componentPurpose"` ComponentModified bool `json:"componentModified"` ComponentModification string `json:"componentModification"` ReleasedOn *time.Time `json:"releasedOn"` ReviewStatus string `json:"reviewStatus"` ReviewedDetails *BomReviewDetails `json:"reviewedDetails,omitempty"` PolicyStatus string `json:"policyStatus"` ApprovalStatus string `json:"approvalStatus"` Ignored bool `json:"ignored"` ManuallyAdjusted bool `json:"manuallyAdjusted"` Licenses []ComplexLicense `json:"licenses"` Usages []string `json:"usages"` Origins []BomComponentOrigin `json:"origins"` LicenseRiskProfile BomRiskProfile `json:"licenseRiskProfile"` VersionRiskProfile BomRiskProfile `json:"versionRiskProfile"` SecurityRiskProfile BomRiskProfile `json:"securityRiskProfile"` ActivityRiskProfile BomRiskProfile `json:"activityRiskProfile"` OperationalRiskProfile BomRiskProfile `json:"operationalRiskProfile"` ActivityData BomActivityData `json:"activityData"` TotalFileMatchCount int `json:"totalFileMatchCount"` MatchTypes []string `json:"matchTypes"` InAttributionReport bool `json:"inAttributionReport"` AttributionStatement string `json:"attributionStatement"` Meta Meta `json:"_meta"` // contains filtered or unexported fields }
BomComponent represents "application/vnd.blackducksoftware.bill-of-materials-6+json" We need to figure out what to do with content type here
func (BomComponent) GetMimeType ¶ added in v0.9.5
func (BomComponent) GetMimeType() string
type BomComponentList ¶
type BomComponentList struct { ItemsListBase Items []BomComponent `json:"items"` // contains filtered or unexported fields }
func (BomComponentList) GetMimeType ¶ added in v0.9.5
func (BomComponentList) GetMimeType() string
type BomComponentOrigin ¶
type BomComponentPolicyRule ¶ added in v0.9.5
type BomComponentPolicyRule struct { PolicyRule PolicyApprovalStatus string `json:"policyApprovalStatus"` Comment string `json:"comment"` // contains filtered or unexported fields }
func (BomComponentPolicyRule) GetMimeType ¶ added in v0.9.5
func (BomComponentPolicyRule) GetMimeType() string
type BomComponentPolicyRulesList ¶ added in v0.9.5
type BomComponentPolicyRulesList struct { ItemsListBase Items []BomComponentPolicyRule `json:"items"` // contains filtered or unexported fields }
result of bom policy-rules link under project's component version
func (BomComponentPolicyRulesList) GetMimeType ¶ added in v0.9.5
func (BomComponentPolicyRulesList) GetMimeType() string
type BomComponentPolicyStatus ¶ added in v0.9.5
type BomComponentPolicyStatus struct { ApprovalStatus string `json:"approvalStatus"` Meta Meta `json:"_meta"` // contains filtered or unexported fields }
result of bom policy-status link under project's component version
func (BomComponentPolicyStatus) GetMimeType ¶ added in v0.9.5
func (BomComponentPolicyStatus) GetMimeType() string
type BomReviewDetails ¶ added in v0.9.5
type BomReviewDetails struct { ReviewedAt *time.Time `json:"reviewedAt,omitempty"` ReviewedBy string `json:"reviewedBy,omitempty"` ReviewingUser BomReviewingUser `json:"reviewingUser"` }
type BomReviewingUser ¶ added in v0.9.5
type BomRiskProfile ¶
type BomRiskProfile struct {
Counts []BomRiskProfileItem `json:"counts"`
}
type BomRiskProfileItem ¶
type BomVulnerableComponent ¶
type BomVulnerableComponent struct { ComponentName string `json:"componentName"` ComponentVersionName string `json:"componentVersionName"` ComponentVersion string `json:"componentVersion"` ComponentVersionOriginName string `json:"componentVersionOriginName"` ComponentVersionOriginID string `json:"componentVersionOriginId"` License ComplexLicense `json:"license"` Vulnerability VulnerabilityWithRemediation `json:"vulnerabilityWithRemediation"` Meta Meta `json:"_meta"` // contains filtered or unexported fields }
func (BomVulnerableComponent) GetMimeType ¶ added in v0.9.5
func (BomVulnerableComponent) GetMimeType() string
type BomVulnerableComponentList ¶
type BomVulnerableComponentList struct { ItemsListBase Items []BomVulnerableComponent `json:"items"` // contains filtered or unexported fields }
"vulnerable-components" link under projects api, link ends with "/vulnerable-bom-components" GET /api/projects/{projectId}/versions/{projectVersionId}/vulnerable-bom-components
func (BomVulnerableComponentList) GetMimeType ¶ added in v0.9.5
func (BomVulnerableComponentList) GetMimeType() string
type CVSS ¶ added in v0.9.5
type CVSS struct { BaseScore float32 `json:"baseScore"` ImpactSubscore float32 `json:"impactSubscore"` ExploitabilitySubscore float32 `json:"exploitabilitySubscore"` AccessVector string `json:"accessVector"` // [LOCAL, ADJACENT_NETWORK, NETWORK] AccessComplexity string `json:"accessComplexity"` Authentication string `json:"authentication"` ConfidentialityImpact string `json:"confidentialityImpact"` IntegrityImpact string `json:"integrityImpact"` AvailabilityImpact string `json:"availabilityImpact"` PrivilegesRequired string `json:"privilegesRequired"` Scope string `json:"scope"` UserInteraction string `json:"userInteraction"` TemporalMetrics *VulnerabilityMetrics `json:"temporalMetrics,omitempty"` Vector string `json:"vector"` }
type CodeLocation ¶
type CodeLocation struct { Name string `json:"name"` Type string `json:"type"` URL string `json:"url"` ScanSize int `json:"scanSize"` MappedProjectVersion string `json:"mappedProjectVersion"` CreatedAt *time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt"` Meta Meta `json:"_meta"` }
func (*CodeLocation) GetProjectVersionLink ¶ added in v0.9.5
func (c *CodeLocation) GetProjectVersionLink() (*ResourceLink, error)
func (*CodeLocation) GetScanSummariesLink ¶
func (c *CodeLocation) GetScanSummariesLink() (*ResourceLink, error)
type CodeLocationList ¶
type CodeLocationList struct { ItemsListBase Items []CodeLocation `json:"items"` }
type CommonConsequence ¶ added in v0.9.5
type ComplexLicense ¶
type ComplexLicense struct { Name string `json:"name,omitempty"` Ownership string `json:"ownership,omitempty"` LicenseType string `json:"type,omitempty"` LicenseDisplay string `json:"licenseDisplay"` Licenses []ComplexLicense `json:"licenses"` License string `json:"license,omitempty"` // License URL SpdxId string `json:"spdxId,omitempty"` // The ID of the license in the SPDX project’s database, if available LicenseFamilySummary *ResourceLink `json:"licenseFamilySummary,omitempty"` }
type Component ¶ added in v0.9.5
type Component struct { Name string `json:"name"` Description string `json:"description,omitempty"` ApprovalStatus string `json:"approvalStatus"` Homepage string `json:"url,omitempty"` AdditionalHomepages []string `json:"additionalHomepages"` PrimaryLanguage string `json:"primaryLanguage,omitempty"` Source string `json:"source"` Type string `json:"type"` Notes string `json:"notes,omitempty"` Meta Meta `json:"_meta"` // contains filtered or unexported fields }
func (Component) GetMimeType ¶ added in v0.9.5
func (Component) GetMimeType() string
type ComponentLicense ¶ added in v0.9.7
type ComponentList ¶ added in v0.9.5
type ComponentList struct { ItemsListBase Items []ComponentVariant `json:"items"` // contains filtered or unexported fields }
func (ComponentList) GetMimeType ¶ added in v0.9.5
func (ComponentList) GetMimeType() string
type ComponentProjectReference ¶ added in v0.9.5
type ComponentProjectReference struct { Distribution string `json:"distribution"` Phase string `json:"phase"` ProjectName string `json:"projectName"` ProjectTier int `json:"projectTier"` ProjectUrl string `json:"projectUrl"` ProjectVersionUrl string `json:"projectVersionUrl"` VersionName string `json:"versionName"` }
type ComponentProjectReferenceList ¶ added in v0.9.5
type ComponentProjectReferenceList struct { ItemsListBase Items []ComponentProjectReference // contains filtered or unexported fields }
returned by "references" component meta link
func (ComponentProjectReferenceList) GetMimeType ¶ added in v0.9.5
func (ComponentProjectReferenceList) GetMimeType() string
type ComponentRemediation ¶ added in v0.9.5
type ComponentRemediation struct { FixesPreviousVulnerabilities *RemediationInfo `json:"fixesPreviousVulnerabilities,omitempty"` NoVulnerabilities *RemediationInfo `json:"noVulnerabilities,omitempty"` LatestAfterCurrent *RemediationInfo `json:"latestAfterCurrent,omitempty"` Meta Meta `json:"_meta"` // contains filtered or unexported fields }
func (ComponentRemediation) GetMimeType ¶ added in v0.9.5
func (ComponentRemediation) GetMimeType() string
type ComponentRequest ¶ added in v0.9.5
type ComponentRequest struct { Name string `json:"name"` Description string `json:"description"` Homepage string `json:"url,omitempty"` AdditionalHomepages []string `json:"additionalHomepages"` ApprovalStatus string `json:"approvalStatus"` // [UNREVIEWED, IN_REVIEW, REVIEWED, APPROVED, LIMITED_APPROVAL, REJECTED, DEPRECATED] Type string `json:"type"` // contains filtered or unexported fields }
func (ComponentRequest) GetMimeType ¶ added in v0.9.5
func (ComponentRequest) GetMimeType() string
type ComponentUpgradeGuidance ¶ added in v0.9.7
type ComponentUpgradeGuidance struct { Component string `json:"component"` ComponentName string `json:"componentName"` Version string `json:"version"` VersionName string `json:"versionName"` Origin string `json:"origin"` OriginName string `json:"originName"` OriginExternalNamespace string `json:"originExternalNamespace"` OriginExternalId string `json:"originExternalId"` ShortTerm *UpgradeGuidance `json:"shortTerm,omitempty"` LongTerm *UpgradeGuidance `json:"longTerm,omitempty"` Meta Meta `json:"_meta"` // contains filtered or unexported fields }
func (ComponentUpgradeGuidance) GetMimeType ¶ added in v0.9.7
func (ComponentUpgradeGuidance) GetMimeType() string
type ComponentVariant ¶ added in v0.9.5
type ComponentVariant struct { ComponentName string `json:"componentName"` VersionName string `json:"versionName,omitempty"` OriginID string `json:"originId,omitempty"` Component string `json:"component"` Version string `json:"version,omitempty"` Variant string `json:"variant,omitempty"` // contains filtered or unexported fields }
func (ComponentVariant) GetMimeType ¶ added in v0.9.5
func (ComponentVariant) GetMimeType() string
type ComponentVersion ¶ added in v0.9.5
type ComponentVersion struct { VersionName string `json:"versionName,omitempty"` ReleasedOn time.Time `json:"releasedOn,omitempty"` License ComplexLicense `json:"license"` Source string `json:"source"` Type string `json:"type"` AdditionalHomepages []string `json:"additionalHomepages"` ApprovalStatus string `json:"approvalStatus"` Notes string `json:"notes,omitempty"` Meta Meta `json:"_meta"` // contains filtered or unexported fields }
func (ComponentVersion) GetMimeType ¶ added in v0.9.5
func (ComponentVersion) GetMimeType() string
type ComponentVersionList ¶ added in v0.9.5
type ComponentVersionList struct { ItemsListBase Items []ComponentVersion `json:"items"` // contains filtered or unexported fields }
func (ComponentVersionList) GetMimeType ¶ added in v0.9.5
func (ComponentVersionList) GetMimeType() string
type ComponentVersionOrigin ¶ added in v0.9.5
type ComponentVersionOrigin struct { ComponentVersion Origin string `json:"originName"` OriginID string `json:"originId"` }
func (ComponentVersionOrigin) GetMimeType ¶ added in v0.9.5
func (ComponentVersionOrigin) GetMimeType() string
type ComponentVersionOriginList ¶ added in v0.9.5
type ComponentVersionOriginList struct { ItemsListBase Items []ComponentVersionOrigin `json:"items"` // contains filtered or unexported fields }
func (ComponentVersionOriginList) GetMimeType ¶ added in v0.9.5
func (ComponentVersionOriginList) GetMimeType() string
type ComponentVulnerability ¶ added in v0.9.7
type ComponentVulnerability struct { Name string `json:"name"` Description string `json:"description"` Severity string `json:"vulnSeverity"` OverallScore float32 `json:"overallScore"` ViolatingPolicies []Policy `json:"violatingPolicies"` PublishedDate *time.Time `json:"publishedDate"` VendorFixDate *time.Time `json:"vendorFixDate,omitempty"` Solution string `json:"solution"` Workaround string `json:"workaround,omitempty"` CWEIds []string `json:"cweIds"` Meta Meta `json:"_meta"` }
type CreateApiTokenResponse ¶ added in v0.9.5
type CreateApiTokenResponse struct { ApiTokenWithMeta Token string `json:"token"` }
type CurrentUserResponse ¶ added in v0.9.5
type CurrentUserResponse struct { UserName string `json:"userName"` ExternalUserName string `json:"externalUserName"` FirstName string `json:"firstName"` LastName string `json:"lastName"` Email string `json:"email"` Type string `json:"type"` Active bool `json:"active"` User string `json:"user"` Meta Meta `json:"_meta"` }
type CurrentVersion ¶ added in v0.9.1
type CweDetails ¶ added in v0.9.5
type CweDetails struct { CweId string `json:"id"` Name string `json:"name"` Description string `json:"description"` ExtendedDescription string `json:"extendedDescription"` CommonConsequences []CommonConsequence `json:"commonConsequences"` Meta Meta `json:"_meta"` // contains filtered or unexported fields }
Common Weakness Enumeration endpoint result -- retrieved from /api/cwes/{cweId} Links: "sources"
func (CweDetails) GetMimeType ¶ added in v0.9.5
func (CweDetails) GetMimeType() string
type DetectURI ¶ added in v0.9.7
type DetectURI struct { Category string `json:"category"` DetectURI string `json:"value"` Meta Meta `json:"_meta"` // contains filtered or unexported fields }
func (DetectURI) GetMimeType ¶ added in v0.9.7
func (DetectURI) GetMimeType() string
type Expression ¶ added in v0.9.5
type Expression struct { Name string `json:"name"` Operation string `json:"operation"` Parameters ExpressionParameter `json:"parameters"` }
type ExpressionParameter ¶ added in v0.9.5
type ExternalExtension ¶
type GetListOptions ¶
GetListOptions describes the parameter model for the list GET endpoints.
func EnsureLimits ¶ added in v0.9.5
func EnsureLimits(glo *GetListOptions) *GetListOptions
func FirstPageOptions ¶ added in v0.9.5
func FirstPageOptions() *GetListOptions
func (*GetListOptions) EnsureLimits ¶ added in v0.9.5
func (glo *GetListOptions) EnsureLimits() *GetListOptions
func (*GetListOptions) NextPage ¶ added in v0.9.5
func (glo *GetListOptions) NextPage() *GetListOptions
func (*GetListOptions) Parameters ¶
func (glo *GetListOptions) Parameters() map[string]string
Parameters implements the URLParameters interface.
type HasMimeType ¶ added in v0.9.5
type HasMimeType interface {
GetMimeType() string
}
type HealthCheckStatus ¶ added in v0.9.8
type HealthCheckStatus struct {
Healthy bool `json:"healthy"`
}
type ItemsListBase ¶ added in v0.9.5
type ItemsListBase struct { TotalCount int `json:"totalCount"` AppliedFilters []interface{} `json:"appliedFilters,omitempty"` Meta Meta `json:"_meta"` }
func (ItemsListBase) Total ¶ added in v0.9.5
func (b ItemsListBase) Total() int
type LicenseDetails ¶ added in v0.9.6
type LicenseDetails struct { Name string `json:"name"` LicenseFamily ResourceLink `json:"licenseFamily"` Ownership string `json:"ownership"` Notes string `json:"notes"` ExpirationDate *time.Time `json:"expirationDate"` CreatedAt *time.Time `json:"createdAt"` CreatedBy *User `json:"createdBy"` UpdatedAt *time.Time `json:"updatedAt"` UpdatedBy *User `json:"updatedBy"` LicenseSource string `json:"licenseSource"` SpdxId string `json:"spdxId,omitempty"` // The ID of the license in the SPDX project’s database, if available LicenseStatus string `json:"licenseStatus"` StatusUpdatedAt *time.Time `json:"statusUpdatedAt"` StatusUpdatedBy *User `json:"statusUpdatedBy"` // contains filtered or unexported fields }
func (LicenseDetails) GetMimeType ¶ added in v0.9.6
func (LicenseDetails) GetMimeType() string
type Meta ¶
type Meta struct { Allow []string `json:"allow"` Href string `json:"href"` Links []ResourceLink `json:"links"` }
func (*Meta) FindLinkByRel ¶
func (m *Meta) FindLinkByRel(rel string) (*ResourceLink, error)
Returns the first link with the corresponding relation value. However, there may be additional matches not returned
func (*Meta) GetLinksByRel ¶ added in v0.9.5
func (m *Meta) GetLinksByRel(rel string) ([]*ResourceLink, error)
Returns all links with the corresponding relation value
type PolicyExpression ¶ added in v0.9.5
type PolicyExpression struct { Operator string `json:"operator"` Expressions []Expression `json:"expressions"` }
type PolicyRule ¶ added in v0.9.5
type PolicyRule struct { Name string `json:"name"` Description string `json:"description"` Enabled bool `json:"enabled"` Overridable bool `json:"overridable"` Severity string `json:"severity"` Expression PolicyExpression `json:"expression"` CreatedAt *time.Time `json:"createdAt"` CreatedBy string `json:"createdBy"` CreatedByUser string `json:"createdByUser"` UpdatedAt *time.Time `json:"updatedAt"` UpdatedBy string `json:"updatedBy"` UpdatedByUser string `json:"updatedByUser"` Meta Meta `json:"_meta"` // contains filtered or unexported fields }
func (PolicyRule) GetMimeType ¶ added in v0.9.5
func (PolicyRule) GetMimeType() string
func (*PolicyRule) IsEqual ¶ added in v0.9.5
func (pr *PolicyRule) IsEqual(obj *PolicyRule) bool
type PolicyRuleList ¶ added in v0.9.5
type PolicyRuleList struct { ItemsListBase Items []PolicyRule `json:"items"` // contains filtered or unexported fields }
func (PolicyRuleList) GetMimeType ¶ added in v0.9.5
func (PolicyRuleList) GetMimeType() string
type PolicyRuleRequest ¶ added in v0.9.5
type PolicyRuleRequest struct { Name string `json:"name"` Description string `json:"description"` Enabled bool `json:"enabled"` Overridable bool `json:"overridable"` Expression PolicyExpression `json:"expression"` Severity string `json:"severity"` // contains filtered or unexported fields }
func (PolicyRuleRequest) GetMimeType ¶ added in v0.9.5
func (PolicyRuleRequest) GetMimeType() string
type PolicyViolationDetails ¶ added in v0.9.5
type PolicyViolationDetails struct { Name string `json:"name"` // [ IN_VIOLATION_OVERRIDDEN, NOT_IN_VIOLATION, IN_VIOLATION ] SeverityLevels []StatusCount `json:"severityLevels"` }
type Project ¶
type Project struct { Name string `json:"name"` Description string `json:"description"` Source string `json:"source"` ProjectTier uint32 `json:"projectTier"` ProjectLevelAdjustments bool `json:"projectLevelAdjustments"` ProjectOwner string `json:"projectOwner"` CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedBy string `json:"createdBy,omitempty"` CreatedByUser string `json:"createdByUser,omitempty"` UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedBy string `json:"updatedBy,omitempty"` UpdatedByUser string `json:"updatedByUser,omitempty"` Meta Meta `json:"_meta"` // contains filtered or unexported fields }
func (Project) GetMimeType ¶ added in v0.9.5
func (Project) GetMimeType() string
func (*Project) GetProjectUsersLink ¶ added in v0.9.3
func (p *Project) GetProjectUsersLink() (*ResourceLink, error)
func (*Project) GetProjectVersionsLink ¶
func (p *Project) GetProjectVersionsLink() (*ResourceLink, error)
type ProjectList ¶
type ProjectList struct { ItemsListBase Items []Project `json:"items"` // contains filtered or unexported fields }
func (ProjectList) GetMimeType ¶ added in v0.9.5
func (ProjectList) GetMimeType() string
type ProjectRequest ¶
type ProjectRequest struct { Name string `json:"name"` Description string `json:"description"` ProjectTier *int `json:"projectTier,omitempty"` ProjectOwner *string `json:"projectOwner,omitempty"` ProjectLevelAdjustments bool `json:"projectLevelAdjustments"` VersionRequest *ProjectVersionRequest `json:"versionRequest,omitempty"` CloneCategories []string `json:"cloneCategories,omitempty"` // [COMPONENT_DATA, VULN_DATA, LICENSE_TERM_FULFILLMENT] CustomSignatureEnabled *bool `json:"customSignatureEnabled,omitempty"` CustomSignatureDepth *int `json:"customSignatureDepth,omitempty"` // contains filtered or unexported fields }
func (ProjectRequest) GetMimeType ¶ added in v0.9.5
func (ProjectRequest) GetMimeType() string
type ProjectVersion ¶
type ProjectVersion struct { VersionName string `json:"versionName"` Nickname string `json:"nickname,omitempty"` ReleaseComments string `json:"releaseComments,omitempty"` ReleasedOn *time.Time `json:"releasedOn,omitempty"` Phase string `json:"phase"` Distribution string `json:"distribution"` License *ComplexLicense `json:"license,omitempty"` CreatedAt *time.Time `json:"createdAt"` CreatedBy string `json:"createdBy"` CreatedByUser string `json:"createdByUser"` SettingUpdatedAt *time.Time `json:"settingUpdatedAt"` SettingUpdatedBy string `json:"settingUpdatedBy"` SettingUpdatedByUser string `json:"settingUpdatedByUser"` Source string `json:"source"` Meta Meta `json:"_meta"` // contains filtered or unexported fields }
func (*ProjectVersion) GetCodeLocationsLink ¶
func (v *ProjectVersion) GetCodeLocationsLink() (*ResourceLink, error)
func (*ProjectVersion) GetComponentsLink ¶
func (v *ProjectVersion) GetComponentsLink() (*ResourceLink, error)
func (ProjectVersion) GetMimeType ¶ added in v0.9.5
func (ProjectVersion) GetMimeType() string
func (*ProjectVersion) GetProjectLink ¶
func (v *ProjectVersion) GetProjectLink() (*ResourceLink, error)
func (*ProjectVersion) GetProjectVersionPolicyStatusLink ¶
func (v *ProjectVersion) GetProjectVersionPolicyStatusLink() (*ResourceLink, error)
func (*ProjectVersion) GetProjectVersionRiskProfileLink ¶
func (v *ProjectVersion) GetProjectVersionRiskProfileLink() (*ResourceLink, error)
func (*ProjectVersion) GetVulnerableComponentsLink ¶
func (v *ProjectVersion) GetVulnerableComponentsLink() (*ResourceLink, error)
type ProjectVersionList ¶
type ProjectVersionList struct { ItemsListBase Items []ProjectVersion `json:"items"` // contains filtered or unexported fields }
func (ProjectVersionList) GetMimeType ¶ added in v0.9.5
func (ProjectVersionList) GetMimeType() string
type ProjectVersionPolicyStatus ¶
type ProjectVersionPolicyStatus struct { OverallStatus string `json:"overallStatus"` UpdatedAt *time.Time `json:"updatedAt"` StatusCounts []StatusCount `json:"componentVersionStatusCounts"` PolicyViolationDetails *PolicyViolationDetails `json:"componentVersionPolicyViolationDetails"` Meta Meta `json:"_meta"` // contains filtered or unexported fields }
func (ProjectVersionPolicyStatus) GetMimeType ¶ added in v0.9.5
func (ProjectVersionPolicyStatus) GetMimeType() string
type ProjectVersionRequest ¶
type ProjectVersionRequest struct { VersionName string `json:"versionName"` Nickname string `json:"nickname,omitempty"` ReleaseComments string `json:"releaseComments,omitempty"` ReleasedOn *time.Time `json:"releasedOn,omitempty"` Phase string `json:"phase"` Distribution string `json:"distribution"` License []ComplexLicense `json:"license,omitempty"` CloneFromReleaseUrl string `json:"cloneFromReleaseUrl,omitempty"` // contains filtered or unexported fields }
func (ProjectVersionRequest) GetMimeType ¶ added in v0.9.5
func (ProjectVersionRequest) GetMimeType() string
type ProjectVersionRiskProfile ¶
type ProjectVersionRiskProfile struct { Categories map[string]map[string]int `json:"categories"` BomLastUpdatedAt *time.Time `json:"bomLastUpdatedAt"` Meta Meta `json:"_meta"` // contains filtered or unexported fields }
TODO: This is horrible, we need to fix up this API
func (ProjectVersionRiskProfile) GetMimeType ¶ added in v0.9.5
func (ProjectVersionRiskProfile) GetMimeType() string
type RapidScanComponent ¶ added in v0.9.7
type RapidScanComponent struct { Name string `json:"componentName"` Version string `json:"versionName"` Identifier string `json:"componentIdentifier"` ExternalId string `json:"externalId"` OriginId string `json:"originId"` ViolatingPolicies []Policy `json:"violatingPolicies"` ComponentViolatingPolicies []Policy `json:"componentViolatingPolicies"` Vulnerabilities []ComponentVulnerability `json:"allVulnerabilities"` Licenses []ComponentLicense `json:"allLicenses"` PolicyViolationVulnerabilities []ComponentVulnerability `json:"policyViolationVulnerabilities"` PolicyViolationLicenses []ComponentLicense `json:"policyViolationLicenses"` PartiallyEvaluatedPolicies []string `json:"partiallyEvaluatedPolicies"` NonEvaluatedPolicies []string `json:"nonEvaluatedPolicies"` DependencyTree [][]string `json:"dependencyTree"` ShortTermUpgradeGuidance UpgradeSuggestion `json:"shortTermUpgradeGuidance"` LongTermUpgradeGuidance UpgradeSuggestion `json:"longTermUpgradeGuidance"` Meta Meta `json:"_meta"` }
type RapidScanResult ¶ added in v0.9.7
type RapidScanResult struct { Count int `json:"totalCount"` Components []RapidScanComponent `json:"items"` AppliedFilters []interface{} `json:"appliedFilters"` Meta Meta `json:"_meta"` }
type RemediationInfo ¶ added in v0.9.5
type ResourceLink ¶
type ScanSummary ¶
type ScanSummary struct { Status string `json:"status"` CreatedAt *time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt"` Meta Meta `json:"_meta"` }
func (*ScanSummary) GetCodeLocationLink ¶
func (s *ScanSummary) GetCodeLocationLink() (*ResourceLink, error)
type ScanSummaryList ¶
type ScanSummaryList struct { ItemsListBase Items []ScanSummary `json:"items"` }
type SsoStatus ¶ added in v0.9.7
type SsoStatus struct { SsoEnabled bool `json:"ssoEnabled"` Meta Meta `json:"_meta"` // contains filtered or unexported fields }
func (SsoStatus) GetMimeType ¶ added in v0.9.7
func (SsoStatus) GetMimeType() string
type StatusCount ¶ added in v0.9.5
type StatusCount struct { Name string `json:"name"` // [ IN_VIOLATION_OVERRIDDEN, NOT_IN_VIOLATION, IN_VIOLATION ] Value int `json:"value"` }
TODO could the names and values be from an enumeration?
type TotalCountable ¶ added in v0.9.5
type TotalCountable interface {
Total() int
}
type URLParameters ¶
URLParameters describes types used as parameter models for GET endpoints.
type UpgradeGuidance ¶ added in v0.9.7
type UpgradeGuidance struct { Version string `json:"version"` VersionName string `json:"versionName"` Origin string `json:"origin"` OriginName string `json:"originName"` OriginExternalNamespace string `json:"originExternalNamespace"` OriginExternalId string `json:"originExternalId"` VulnerabilityRisk *VulnerabilityRisk `json:"vulnerabilityRisk,omitempty"` }
type UpgradeSuggestion ¶ added in v0.9.11
type UserAssignmentRequest ¶ added in v0.9.3
type UserAssignmentRequest struct {
User string `json:"user"`
}
type UserList ¶ added in v0.9.3
type UserList struct { ItemsListBase Items []User `json:"items"` }
type UserRequest ¶ added in v0.9.3
type VulnerabilitiesList ¶ added in v0.9.6
type VulnerabilitiesList struct { ItemsListBase Items []Vulnerability `json:"items"` // contains filtered or unexported fields }
returned by (what I saw so far --tandr) /api/component/xxx/version/yyy/vulnerabilities
func (VulnerabilitiesList) GetMimeType ¶ added in v0.9.6
func (VulnerabilitiesList) GetMimeType() string
type Vulnerability ¶ added in v0.9.5
type Vulnerability struct { Source string `json:"source"` Name string `json:"name"` Title string `json:"title"` Description string `json:"description"` TechnicalDescription string `json:"technicalDescription"` PublishedDate *time.Time `json:"publishedDate"` UpdatedDate *time.Time `json:"updatedDate"` DisclosureDate *time.Time `json:"disclosureDate"` ExploitPublishDate *time.Time `json:"exploitPublishDate"` SolutionDate *time.Time `json:"solutionDate"` Solution string `json:"solution"` Severity string `json:"severity"` // [LOW, MEDIUM, HIGH, CRITICAL] CVSS2 *CVSS `json:"cvss2,omitempty"` CVSS3 *CVSS `json:"cvss3,omitempty"` UseCVSS3 bool `json:"useCvss3"` OverallScore float32 `json:"overallScore"` Classifications []string `json:"classifications"` Workaround string `json:"workaround,omitempty"` VendorFixDate *time.Time `json:"vendorFixDate,omitempty"` Credit string `json:"credit,omitempty"` DiscoveryDate *time.Time `json:"discoveryDate,omitempty"` VendorNotificationDate *time.Time `json:"vendorNotificationDate,omitempty"` ZeroDay bool `json:"zeroDay,omitempty"` UnderReview bool `json:"underReview,omitempty"` ParentAdvisory bool `json:"parentAdvisory,omitempty"` BDSATags []string `json:"bdsaTags,omitempty"` Meta Meta `json:"_meta"` // contains filtered or unexported fields }
Data representation of the values returned by /api/vulnerabilities/$vulnerability
func (Vulnerability) GetMimeType ¶ added in v0.9.5
func (Vulnerability) GetMimeType() string
type VulnerabilityMetrics ¶ added in v0.9.5
type VulnerabilityRisk ¶ added in v0.9.7
type VulnerabilityWithRemediation ¶
type VulnerabilityWithRemediation struct { VulnerabilityName string `json:"vulnerabilityName"` Description string `json:"description"` VulnerabilityPublishedDate *time.Time `json:"vulnerabilityPublishedDate"` VulnerabilityUpdatedDate *time.Time `json:"vulnerabilityUpdatedDate"` BaseScore float32 `json:"baseScore"` ExploitabilitySubscore float32 `json:"exploitabilitySubscore"` ImpactSubscore float32 `json:"impactSubscore"` Source string `json:"source"` Severity string `json:"severity"` CweId string `json:"cweId,omitempty"` RemediationStatus string `json:"remediationStatus"` RemediationTargetAt *time.Time `json:"remediationTargetAt"` RemediationActualAt *time.Time `json:"remediationActualAt"` RemediationCreatedAt *time.Time `json:"remediationCreatedAt"` RemediationUpdatedAt *time.Time `json:"remediationUpdatedAt"` }
Source Files ¶
- bom-api.go
- codelocations-api.go
- common-api.go
- component-api.go
- current-user.go
- currentversion-api.go
- extconfig-detect-uri-api.go
- extensions-api.go
- health-check-api.go
- license-api.go
- mime-types.go
- policyrules-api.go
- projects-api.go
- projects-versions-api.go
- rapid-scans-api.go
- ssostatus-api.go
- url-builder.go
- urlparameters.go
- users-api.go
- vulnerabilities.go