Documentation ¶
Index ¶
- Constants
- func NewHubServer(config *HubConfig) *hubServer
- func ValidateGetProjectVersion(projectVersionUrl string, hubConfig *HubConfig) bool
- type Annotator
- func (a *Annotator) CreateBlackduckPolicyAnnotation(hasPolicyViolations bool, humanReadableURL string, policyCount string) *BlackduckAnnotation
- func (a *Annotator) CreateBlackduckVulnerabilityAnnotation(hasVulns bool, humanReadableURL string, vulnCount string) *BlackduckAnnotation
- func (a *Annotator) IsScanNeeded(info ImageInfo, ref string, hubConfig *HubConfig) bool
- func (a *Annotator) UpdateAnnotations(inputImageInfo ImageInfo, ref string, violations int, vulnerabilitiies int, ...) ImageInfo
- type BlackduckAnnotation
- type CodeLocationStruct
- type CodeLocationsStruct
- type HubConfig
- type ImageInfo
- type ScanSummaryStruct
Constants ¶
View Source
const ScannerProjectVersionUrl = "blackducksoftware.com/project-endpoint"
View Source
const ScannerScanId = "blackducksoftware.com/scan-id"
Variables ¶
This section is empty.
Functions ¶
func NewHubServer ¶
func NewHubServer(config *HubConfig) *hubServer
Types ¶
type Annotator ¶
func NewAnnotator ¶
Create a new annotator
func (*Annotator) CreateBlackduckPolicyAnnotation ¶
func (a *Annotator) CreateBlackduckPolicyAnnotation(hasPolicyViolations bool, humanReadableURL string, policyCount string) *BlackduckAnnotation
func (*Annotator) CreateBlackduckVulnerabilityAnnotation ¶
func (a *Annotator) CreateBlackduckVulnerabilityAnnotation(hasVulns bool, humanReadableURL string, vulnCount string) *BlackduckAnnotation
CreateOpenshiftAnnotations takes the primitive information from UpdateAnnotation and translates it to openshift.
func (*Annotator) IsScanNeeded ¶
Determine if a scan of the specified image is required
func (*Annotator) UpdateAnnotations ¶
func (a *Annotator) UpdateAnnotations(inputImageInfo ImageInfo, ref string, violations int, vulnerabilitiies int, projectVersionUrl string, scanId string, projectVersionUIUrl string) ImageInfo
UpdateAnnotations creates a NEW image from an old one, and returns a new image info with annotations and labels from scan results. TODO Rename this function to express the fact that it isn't actually updating any data structure, but rather creating a new one.
type BlackduckAnnotation ¶
type BlackduckAnnotation struct {
// contains filtered or unexported fields
}
func (*BlackduckAnnotation) AsString ¶
func (o *BlackduckAnnotation) AsString() string
AsString makes a map corresponding to the Openshift Container Security guide (https://people.redhat.com/aweiteka/docs/preview/20170510/security/container_content.html).
type CodeLocationStruct ¶
type CodeLocationStruct struct { Type string `json:"type"` Name string `json:"name"` URL string `json:"url"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` MappedProjectVersion string `json:"mappedProjectVersion"` Meta struct { Allow []string `json:"allow"` Href string `json:"href"` Links []struct { Rel string `json:"rel"` Href string `json:"href"` } `json:"links"` } `json:"_meta"` }
type CodeLocationsStruct ¶
type CodeLocationsStruct struct { TotalCount int `json:"totalCount"` Items []struct { Type string `json:"type"` URL string `json:"url"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` MappedProjectVersion string `json:"mappedProjectVersion"` Meta struct { Allow []string `json:"allow"` Href string `json:"href"` Links []struct { Rel string `json:"rel"` Href string `json:"href"` } `json:"links"` } `json:"_meta"` } `json:"items"` Meta struct { Allow []string `json:"allow"` Href string `json:"href"` Links []interface{} `json:"links"` } `json:"_meta"` AppliedFilters []interface{} `json:"appliedFilters"` }
type ImageInfo ¶
func ProjectVersionResults ¶
type ScanSummaryStruct ¶
type ScanSummaryStruct struct { Status string `json:"status"` CreatedAt time.Time `json:"createdAt"` Meta struct { Allow []string `json:"allow"` Href string `json:"href"` Links []struct { Rel string `json:"rel"` Href string `json:"href"` } `json:"links"` } `json:"_meta"` UpdatedAt time.Time `json:"updatedAt"` }
Click to show internal directories.
Click to hide internal directories.