Satisfy golint

This commit is contained in:
Stefan Majer 2017-04-07 19:26:53 +02:00
parent 4e340ff25e
commit 616d466f64
2 changed files with 4 additions and 0 deletions

View file

@ -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 {

View file

@ -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"`