2020-08-18 23:53:04 -07:00
|
|
|
scalar Time
|
|
|
|
|
2020-06-26 12:09:10 -07:00
|
|
|
type CVEResultForImage {
|
2022-01-19 17:57:10 +02:00
|
|
|
Tag: String
|
|
|
|
CVEList: [CVE]
|
2020-06-26 12:09:10 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
type CVE {
|
2022-01-19 17:57:10 +02:00
|
|
|
Id: String
|
|
|
|
Title: String
|
|
|
|
Description: String
|
|
|
|
Severity: String
|
|
|
|
PackageList: [PackageInfo]
|
2020-06-26 12:09:10 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
type PackageInfo {
|
2022-01-19 17:57:10 +02:00
|
|
|
Name: String
|
|
|
|
InstalledVersion: String
|
|
|
|
FixedVersion: String
|
2021-01-25 10:04:03 -08:00
|
|
|
}
|
|
|
|
|
2022-02-02 02:02:05 +00:00
|
|
|
type RepoInfo {
|
2022-01-19 17:57:10 +02:00
|
|
|
Images: [ImageSummary]
|
|
|
|
Summary: RepoSummary
|
2022-02-02 02:02:05 +00:00
|
|
|
}
|
|
|
|
|
2022-07-12 15:58:04 +03:00
|
|
|
# Search results in all repos/images/layers
|
|
|
|
# There will be other more structures for more detailed information
|
|
|
|
type GlobalSearchResult {
|
2022-07-29 13:08:44 +03:00
|
|
|
Page: PageInfo
|
2022-01-19 17:57:10 +02:00
|
|
|
Images: [ImageSummary]
|
|
|
|
Repos: [RepoSummary]
|
|
|
|
Layers: [LayerSummary]
|
2022-07-12 15:58:04 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
# 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 {
|
2022-01-19 17:57:10 +02:00
|
|
|
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
|
2022-07-29 13:08:44 +03:00
|
|
|
Licenses: String # The value of the annotation if present, 'unknown' otherwise).
|
2022-01-19 17:57:10 +02:00
|
|
|
Labels: String
|
2022-07-29 13:08:44 +03:00
|
|
|
Title: String
|
|
|
|
Source: String
|
|
|
|
Documentation: String
|
2022-07-12 15:58:04 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
# Brief on a specific repo to be used in queries returning a list of repos
|
|
|
|
type RepoSummary {
|
2022-01-19 17:57:10 +02:00
|
|
|
Name: String
|
|
|
|
LastUpdated: Time
|
|
|
|
Size: String
|
|
|
|
Platforms: [OsArch]
|
|
|
|
Vendors: [String]
|
|
|
|
Score: Int
|
2022-07-29 13:08:44 +03:00
|
|
|
NewestImage: ImageSummary # Newest based on created timestamp
|
2022-01-19 17:57:10 +02:00
|
|
|
DownloadCount: Int
|
|
|
|
StarCount: Int
|
|
|
|
IsBookmarked: Boolean
|
2022-07-29 13:08:44 +03:00
|
|
|
IsStarred: Boolean
|
2022-07-12 15:58:04 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
# Currently the same as LayerInfo, we can refactor later
|
|
|
|
# For detailed information on the layer a ImageListForDigest call can be made
|
|
|
|
type LayerSummary {
|
2022-01-19 17:57:10 +02:00
|
|
|
Size: String # Int64 is not supported.
|
|
|
|
Digest: String
|
|
|
|
Score: Int
|
2022-07-12 15:58:04 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
type OsArch {
|
2022-01-19 17:57:10 +02:00
|
|
|
Os: String
|
|
|
|
Arch: String
|
2022-07-12 15:58:04 +03:00
|
|
|
}
|
|
|
|
|
2022-07-29 13:08:44 +03:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2020-06-26 12:09:10 -07:00
|
|
|
type Query {
|
2022-01-19 17:57:10 +02:00
|
|
|
CVEListForImage(image: String!): CVEResultForImage!
|
|
|
|
ImageListForCVE(id: String!): [ImageSummary!]
|
|
|
|
ImageListWithCVEFixed(id: String!, image: String!): [ImageSummary!]
|
|
|
|
ImageListForDigest(id: String!): [ImageSummary!]
|
2022-07-29 18:33:34 +03:00
|
|
|
RepoListWithNewestImage: [RepoSummary!]! # Newest based on created timestamp
|
2022-01-19 17:57:10 +02:00
|
|
|
ImageList(repo: String!): [ImageSummary!]
|
|
|
|
ExpandedRepoInfo(repo: String!): RepoInfo!
|
2022-07-29 13:08:44 +03:00
|
|
|
GlobalSearch(query: String!, requestedPage: PageInput): GlobalSearchResult! # Return all images/repos/layers which match the query
|
2022-08-08 10:40:30 +03:00
|
|
|
DerivedImageList(image: String!): [ImageSummary!]
|
2021-01-25 10:04:03 -08:00
|
|
|
}
|