2022-09-30 12:32:32 -05:00
|
|
|
package common
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
type RepoInfo struct {
|
|
|
|
Summary RepoSummary
|
|
|
|
ImageSummaries []ImageSummary `json:"images"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type RepoSummary struct {
|
|
|
|
Name string `json:"name"`
|
|
|
|
LastUpdated time.Time `json:"lastUpdated"`
|
|
|
|
Size string `json:"size"`
|
|
|
|
Platforms []OsArch `json:"platforms"`
|
|
|
|
Vendors []string `json:"vendors"`
|
|
|
|
Score int `json:"score"`
|
|
|
|
NewestImage ImageSummary `json:"newestImage"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type ImageSummary struct {
|
|
|
|
RepoName string `json:"repoName"`
|
|
|
|
Tag string `json:"tag"`
|
|
|
|
Digest string `json:"digest"`
|
|
|
|
ConfigDigest string `json:"configDigest"`
|
|
|
|
LastUpdated time.Time `json:"lastUpdated"`
|
|
|
|
IsSigned bool `json:"isSigned"`
|
|
|
|
Size string `json:"size"`
|
|
|
|
Platform OsArch `json:"platform"`
|
|
|
|
Vendor string `json:"vendor"`
|
|
|
|
Score int `json:"score"`
|
|
|
|
DownloadCount int `json:"downloadCount"`
|
|
|
|
Description string `json:"description"`
|
|
|
|
Licenses string `json:"licenses"`
|
|
|
|
Labels string `json:"labels"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
Source string `json:"source"`
|
|
|
|
Documentation string `json:"documentation"`
|
|
|
|
History []LayerHistory `json:"history"`
|
|
|
|
Layers []LayerSummary `json:"layers"`
|
|
|
|
Vulnerabilities ImageVulnerabilitySummary `json:"vulnerabilities"`
|
2022-11-10 18:02:17 -05:00
|
|
|
Authors string `json:"authors"`
|
2022-09-30 12:32:32 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
type OsArch struct {
|
|
|
|
Os string `json:"os"`
|
|
|
|
Arch string `json:"arch"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type ImageVulnerabilitySummary struct {
|
|
|
|
MaxSeverity string `json:"maxSeverity"`
|
|
|
|
Count int `json:"count"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type LayerSummary struct {
|
|
|
|
Size string `json:"size"`
|
|
|
|
Digest string `json:"digest"`
|
|
|
|
Score int `json:"score"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type LayerHistory struct {
|
|
|
|
Layer LayerSummary `json:"layer"`
|
|
|
|
HistoryDescription HistoryDescription `json:"historyDescription"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type HistoryDescription struct {
|
|
|
|
Created time.Time `json:"created"`
|
|
|
|
CreatedBy string `json:"createdBy"`
|
|
|
|
Author string `json:"author"`
|
|
|
|
Comment string `json:"comment"`
|
|
|
|
EmptyLayer bool `json:"emptyLayer"`
|
|
|
|
}
|
2022-11-23 13:53:28 -05:00
|
|
|
|
|
|
|
type Referrer struct {
|
|
|
|
MediaType string `json:"mediatype"`
|
|
|
|
ArtifactType string `json:"artifacttype"`
|
|
|
|
Size int `json:"size"`
|
|
|
|
Digest string `json:"digest"`
|
|
|
|
Annotations []Annotation `json:"annotations"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Annotation struct {
|
|
|
|
Key string `json:"key"`
|
|
|
|
Value string `json:"value"`
|
|
|
|
}
|