mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 21:17:58 +08:00
feat(GraphQL): playground, served by zot in specific binary (#753)
Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com>
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
scalar Time
|
||||
|
||||
"""
|
||||
Contains the tag of the image and a list of CVEs
|
||||
"""
|
||||
type CVEResultForImage {
|
||||
Tag: String
|
||||
CVEList: [CVE]
|
||||
}
|
||||
|
||||
"""
|
||||
Contains various details about the CVE and a list of PackageInfo about the affected packages
|
||||
"""
|
||||
type CVE {
|
||||
Id: String
|
||||
Title: String
|
||||
@@ -13,12 +19,18 @@ type CVE {
|
||||
PackageList: [PackageInfo]
|
||||
}
|
||||
|
||||
"""
|
||||
Contains the name of the package, the current installed version and the version where the CVE was fixed
|
||||
"""
|
||||
type PackageInfo {
|
||||
Name: String
|
||||
InstalledVersion: String
|
||||
FixedVersion: String
|
||||
}
|
||||
|
||||
"""
|
||||
Contains details about the repo: a list of image summaries and a summary of the repo
|
||||
"""
|
||||
type RepoInfo {
|
||||
Images: [ImageSummary]
|
||||
Summary: RepoSummary
|
||||
@@ -26,6 +38,9 @@ type RepoInfo {
|
||||
|
||||
# Search results in all repos/images/layers
|
||||
# There will be other more structures for more detailed information
|
||||
"""
|
||||
Search everything. Can search Images, Repos and Layers
|
||||
"""
|
||||
type GlobalSearchResult {
|
||||
Images: [ImageSummary]
|
||||
Repos: [RepoSummary]
|
||||
@@ -34,6 +49,9 @@ type GlobalSearchResult {
|
||||
|
||||
# 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
|
||||
"""
|
||||
Contains details about the image
|
||||
"""
|
||||
type ImageSummary {
|
||||
RepoName: String
|
||||
Tag: String
|
||||
@@ -63,6 +81,9 @@ type ImageVulnerabilitySummary {
|
||||
}
|
||||
|
||||
# Brief on a specific repo to be used in queries returning a list of repos
|
||||
"""
|
||||
Contains details about the repo
|
||||
"""
|
||||
type RepoSummary {
|
||||
Name: String
|
||||
LastUpdated: Time
|
||||
@@ -78,6 +99,9 @@ type RepoSummary {
|
||||
|
||||
# Currently the same as LayerInfo, we can refactor later
|
||||
# For detailed information on the layer a ImageListForDigest call can be made
|
||||
"""
|
||||
Contains details about the layer
|
||||
"""
|
||||
type LayerSummary {
|
||||
Size: String # Int64 is not supported.
|
||||
Digest: String
|
||||
@@ -109,21 +133,67 @@ type LayerHistory {
|
||||
HistoryDescription: HistoryDescription
|
||||
}
|
||||
|
||||
"""
|
||||
Contains details about the supported OS and architecture of the image
|
||||
"""
|
||||
type OsArch {
|
||||
Os: String
|
||||
Arch: String
|
||||
}
|
||||
|
||||
type Query {
|
||||
"""
|
||||
Returns a CVE list for the image specified in the arugment
|
||||
"""
|
||||
CVEListForImage(image: String!): CVEResultForImage!
|
||||
|
||||
"""
|
||||
Returns a list of images vulnerable to the CVE of the specified ID
|
||||
"""
|
||||
ImageListForCVE(id: String!): [ImageSummary!]
|
||||
|
||||
"""
|
||||
Returns a list of images that are no longer vulnerable to the CVE of the specified ID, from the specified image (repo)
|
||||
"""
|
||||
ImageListWithCVEFixed(id: String!, image: String!): [ImageSummary!]
|
||||
|
||||
"""
|
||||
Returns a list of images which contain the specified digest
|
||||
"""
|
||||
ImageListForDigest(id: String!): [ImageSummary!]
|
||||
|
||||
"""
|
||||
Returns a list of repos with the newest tag within
|
||||
"""
|
||||
RepoListWithNewestImage: [RepoSummary!]! # Newest based on created timestamp
|
||||
|
||||
"""
|
||||
Returns all the images from the specified repo
|
||||
"""
|
||||
ImageList(repo: String!): [ImageSummary!]
|
||||
|
||||
"""
|
||||
Returns information about the specified repo
|
||||
"""
|
||||
ExpandedRepoInfo(repo: String!): RepoInfo!
|
||||
|
||||
"""
|
||||
Searches within repos, images, and layers
|
||||
"""
|
||||
GlobalSearch(query: String!): GlobalSearchResult!
|
||||
|
||||
"""
|
||||
List of images which use the argument image
|
||||
"""
|
||||
DerivedImageList(image: String!): [ImageSummary!]
|
||||
|
||||
"""
|
||||
List of images on which the argument image depends on
|
||||
"""
|
||||
BaseImageList(image: String!): [ImageSummary!]
|
||||
|
||||
"""
|
||||
Search for a specific image using its name
|
||||
"""
|
||||
Image(image: String!): ImageSummary
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user