mirror of
https://github.com/genuinetools/reg.git
synced 2024-07-02 11:54:15 -04:00
35 lines
1.6 KiB
Go
35 lines
1.6 KiB
Go
![]() |
package clair
|
||
|
|
||
|
// Layer represents an image layer.
|
||
|
type Layer struct {
|
||
|
Name string `json:"Name,omitempty"`
|
||
|
NamespaceName string `json:"NamespaceName,omitempty"`
|
||
|
Path string `json:"Path,omitempty"`
|
||
|
Headers map[string]string `json:"Headers,omitempty"`
|
||
|
ParentName string `json:"ParentName,omitempty"`
|
||
|
Format string `json:"Format,omitempty"`
|
||
|
IndexedByVersion int `json:"IndexedByVersion,omitempty"`
|
||
|
Features []feature `json:"Features,omitempty"`
|
||
|
}
|
||
|
|
||
|
// Vulnerability represents vulnerability entity returned by Clair.
|
||
|
type Vulnerability struct {
|
||
|
Name string `json:"Name,omitempty"`
|
||
|
NamespaceName string `json:"NamespaceName,omitempty"`
|
||
|
Description string `json:"Description,omitempty"`
|
||
|
Link string `json:"Link,omitempty"`
|
||
|
Severity string `json:"Severity,omitempty"`
|
||
|
Metadata map[string]interface{} `json:"Metadata,omitempty"`
|
||
|
FixedBy string `json:"FixedBy,omitempty"`
|
||
|
FixedIn []feature `json:"FixedIn,omitempty"`
|
||
|
}
|
||
|
|
||
|
type feature struct {
|
||
|
Name string `json:"Name,omitempty"`
|
||
|
NamespaceName string `json:"NamespaceName,omitempty"`
|
||
|
VersionFormat string `json:"VersionFormat,omitempty"`
|
||
|
Version string `json:"Version,omitempty"`
|
||
|
Vulnerabilities []Vulnerability `json:"Vulnerabilities,omitempty"`
|
||
|
AddedBy string `json:"AddedBy,omitempty"`
|
||
|
}
|