mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-28 11:46:20 -04:00
Satisfy golint
This commit is contained in:
parent
4e340ff25e
commit
616d466f64
2 changed files with 4 additions and 0 deletions
|
@ -9,6 +9,7 @@ import (
|
|||
"github.com/jessfraz/reg/registry"
|
||||
)
|
||||
|
||||
// Vulnerabilities scans the given repo and tag
|
||||
func (c *Clair) Vulnerabilities(r *registry.Registry, repo, tag string, m schema1.SignedManifest) (VulnerabilityReport, error) {
|
||||
report := VulnerabilityReport{
|
||||
RegistryURL: r.Domain,
|
||||
|
@ -77,6 +78,7 @@ func (c *Clair) Vulnerabilities(r *registry.Registry, repo, tag string, m schema
|
|||
return report, nil
|
||||
}
|
||||
|
||||
// NewClairLayer will form a layer struct required for a clar scan
|
||||
func (c *Clair) NewClairLayer(r *registry.Registry, image string, fsLayers []schema1.FSLayer, index int) (*Layer, error) {
|
||||
var parentName string
|
||||
if index < len(fsLayers)-1 {
|
||||
|
|
|
@ -32,6 +32,7 @@ type Template struct {
|
|||
templates *template.Template
|
||||
}
|
||||
|
||||
// A Repository holds data after a vulnerability scan of a single repo
|
||||
type Repository struct {
|
||||
Name string `json:"name"`
|
||||
Tag string `json:"tag"`
|
||||
|
@ -40,6 +41,7 @@ type Repository struct {
|
|||
VulnerabilityReport clair.VulnerabilityReport `json:"vulnerability"`
|
||||
}
|
||||
|
||||
// A AnalysisResult holds all vulnerabilities of a scan
|
||||
type AnalysisResult struct {
|
||||
Repositories []Repository `json:"repositories"`
|
||||
RegistryDomain string `json:"registrydomain"`
|
||||
|
|
Loading…
Reference in a new issue