mirror of
https://github.com/project-zot/zot.git
synced 2025-01-06 22:40:28 -05:00
e3cb60b856
fix transaction problem change bolt-db version Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
120 lines
2.7 KiB
GraphQL
120 lines
2.7 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 RepoInfo {
|
|
Images: [ImageSummary]
|
|
Summary: RepoSummary
|
|
}
|
|
|
|
# Search results in all repos/images/layers
|
|
# There will be other more structures for more detailed information
|
|
type GlobalSearchResult {
|
|
Page: PageInfo
|
|
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
|
|
Digest: String
|
|
ConfigDigest: String
|
|
LastUpdated: Time
|
|
IsSigned: Boolean
|
|
Size: String
|
|
Platform: OsArch
|
|
Vendor: String
|
|
Score: Int
|
|
DownloadCount: Int
|
|
Layers: [LayerSummary]
|
|
Description: String
|
|
Licenses: String # The value of the annotation if present, 'unknown' otherwise).
|
|
Labels: String
|
|
Title: String
|
|
Source: String
|
|
Documentation: String
|
|
}
|
|
|
|
# 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
|
|
NewestImage: ImageSummary # Newest based on created timestamp
|
|
DownloadCount: Int
|
|
StarCount: Int
|
|
IsBookmarked: Boolean
|
|
IsStarred: Boolean
|
|
}
|
|
|
|
# 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
|
|
}
|
|
|
|
enum SortCriteria {
|
|
RELEVANCE
|
|
UPDATE_TIME
|
|
ALPHABETIC_ASC
|
|
ALPHABETIC_DSC
|
|
STARS
|
|
DOWNLOADS
|
|
}
|
|
|
|
type PageInfo {
|
|
ObjectCount: Int!
|
|
PreviousPage: Int
|
|
NextPage: Int
|
|
Pages: Int
|
|
}
|
|
|
|
# Pagination parameters
|
|
input PageInput {
|
|
limit: Int
|
|
offset: Int
|
|
sortBy: SortCriteria
|
|
}
|
|
|
|
type Query {
|
|
CVEListForImage(image: String!): CVEResultForImage!
|
|
ImageListForCVE(id: String!): [ImageSummary!]
|
|
ImageListWithCVEFixed(id: String!, image: String!): [ImageSummary!]
|
|
ImageListForDigest(id: String!): [ImageSummary!]
|
|
RepoListWithNewestImage: [RepoSummary!]! # Newest based on created timestamp
|
|
ImageList(repo: String!): [ImageSummary!]
|
|
ExpandedRepoInfo(repo: String!): RepoInfo!
|
|
GlobalSearch(query: String!, requestedPage: PageInput): GlobalSearchResult! # Return all images/repos/layers which match the query
|
|
DerivedImageList(image: String!): [ImageSummary!]
|
|
}
|