mirror of
https://github.com/project-zot/zot.git
synced 2024-12-16 21:56:37 -05:00
b5f27c5b50
ImageListWithLatestTag currently returns a list of ImageInfo objects. It needs to return consistent results with the API used for Global search as the same information will be used by the UI in the same type or cards. So we need to update RepoSummary to include the data which right now is present in ImageInfo, but missing from RepoSummary (information on the latest tag in that specific repo). Will update return type of ImageListWithLatestTag in a later PR (issue tracked in a separate GH issue) Closes #666 Signed-off-by: Andrei Aaron <andaaron@cisco.com>
122 lines
2.4 KiB
GraphQL
122 lines
2.4 KiB
GraphQL
scalar Time
|
|
|
|
type CVEResultForImage {
|
|
Tag: String
|
|
CVEList: [CVE]
|
|
}
|
|
|
|
type CVE {
|
|
Id: String
|
|
Title: String
|
|
Description: String
|
|
Severity: String
|
|
PackageList: [PackageInfo]
|
|
}
|
|
|
|
type PackageInfo {
|
|
Name: String
|
|
InstalledVersion: String
|
|
FixedVersion: String
|
|
}
|
|
|
|
type ImgResultForCVE {
|
|
Name: String
|
|
Tags: [String]
|
|
}
|
|
|
|
type ImgResultForFixedCVE {
|
|
Tags: [TagInfo]
|
|
}
|
|
|
|
type ImgResultForDigest {
|
|
Name: String
|
|
Tags: [String]
|
|
}
|
|
|
|
type TagInfo {
|
|
Name: String
|
|
Digest: String
|
|
Timestamp: Time
|
|
}
|
|
|
|
type ImageInfo {
|
|
Name: String
|
|
Latest: String
|
|
LastUpdated: Time
|
|
Description: String
|
|
Licenses: String
|
|
Vendor: String
|
|
Size: String
|
|
Labels: String
|
|
}
|
|
|
|
type RepoInfo {
|
|
Manifests: [ManifestInfo]
|
|
}
|
|
|
|
type ManifestInfo {
|
|
Digest: String
|
|
Tag: String
|
|
IsSigned: Boolean
|
|
Layers: [LayerInfo]
|
|
}
|
|
|
|
type LayerInfo {
|
|
Size: String # Int64 is not supported.
|
|
Digest: String
|
|
}
|
|
|
|
# Search results in all repos/images/layers
|
|
# There will be other more structures for more detailed information
|
|
type GlobalSearchResult {
|
|
Images: [ImageSummary]
|
|
Repos: [RepoSummary]
|
|
Layers: [LayerSummary]
|
|
}
|
|
|
|
# Brief on a specific image to be used in queries returning a list of images
|
|
# We define an image as a pairing or a repo and a tag belonging to that repo
|
|
type ImageSummary {
|
|
RepoName: String
|
|
Tag: String
|
|
LastUpdated: Time
|
|
IsSigned: Boolean
|
|
Size: String
|
|
Platform: OsArch
|
|
Vendor: String
|
|
Score: Int
|
|
}
|
|
|
|
# Brief on a specific repo to be used in queries returning a list of repos
|
|
type RepoSummary {
|
|
Name: String
|
|
LastUpdated: Time
|
|
Size: String
|
|
Platforms: [OsArch]
|
|
Vendors: [String]
|
|
Score: Int
|
|
NewestTag: ImageSummary
|
|
}
|
|
|
|
# Currently the same as LayerInfo, we can refactor later
|
|
# For detailed information on the layer a ImageListForDigest call can be made
|
|
type LayerSummary {
|
|
Size: String # Int64 is not supported.
|
|
Digest: String
|
|
Score: Int
|
|
}
|
|
|
|
type OsArch {
|
|
Os: String
|
|
Arch: String
|
|
}
|
|
|
|
type Query {
|
|
CVEListForImage(image: String!) :CVEResultForImage
|
|
ImageListForCVE(id: String!) :[ImgResultForCVE]
|
|
ImageListWithCVEFixed(id: String!, image: String!) :ImgResultForFixedCVE
|
|
ImageListForDigest(id: String!) :[ImgResultForDigest]
|
|
ImageListWithLatestTag:[ImageInfo]
|
|
ExpandedRepoInfo(repo: String!):RepoInfo
|
|
GlobalSearch(query: String!): GlobalSearchResult
|
|
}
|