0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2025-01-06 22:40:28 -05:00
zot/pkg/extensions/search/gql_generated/models_gen.go

116 lines
4.1 KiB
Go
Raw Normal View History

// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
Update to graphql 1.17.13 We encountered some problems with using the existing folder structure, but it looks like running the tooling with the latest versions works after we regenerated the project using 'gql init' and refactoring to separate the login previously in resolvers.go. - the autogenerated code is now under the gql_generated folder - the file resolvers.go now contains only the code which is not rewritten by the gqlgen framework - the file schema.resolvers.go is rewritten when gqlgen runs, and we'll only keep there the actual resolvers matching query names Changes we observed to schema.resolvers.go when gqlgen runs include reordering methods, and renaming function parameters to match the names used in schema.graphql - we now have a gqlgen.yaml config file which governs the behavior of gqlgen (can be tweaked to restructure the folder structure of the generated code in the future) Looks like the new graphql server has better validation 1 Returns 422 instead of 200 for missing query string - had to update tests 2 Correctly uncovered an error in a test for a bad `%` in query string. As as result of 2, a `masked` bug was found in the way we check if images are signed with Notary, the signatures were reasched for with the media type of the image manifest itself instead of the media type for notation. Fixed this bug, and improved error messages. This bug would have also been reproducible with main branch if the bad `%` in the test would have fixed. Updated the linter to ignore some issues with the code which is always rewritten when running: `go run github.com/99designs/gqlgen@v0.17.13 generate` Add a workflow to test gqlgen works and has no uncommitted changes Signed-off-by: Andrei Aaron <andaaron@cisco.com>
2022-07-15 06:10:51 -05:00
package gql_generated
import (
"time"
)
// Contains various details about the CVE and a list of PackageInfo about the affected packages
type Cve struct {
ID *string `json:"Id"`
Title *string `json:"Title"`
Description *string `json:"Description"`
Severity *string `json:"Severity"`
PackageList []*PackageInfo `json:"PackageList"`
}
// Contains the tag of the image and a list of CVEs
type CVEResultForImage struct {
Tag *string `json:"Tag"`
CVEList []*Cve `json:"CVEList"`
}
// Search everything. Can search Images, Repos and Layers
type GlobalSearchResult struct {
Images []*ImageSummary `json:"Images"`
Repos []*RepoSummary `json:"Repos"`
Layers []*LayerSummary `json:"Layers"`
}
type HistoryDescription struct {
Created *time.Time `json:"Created"`
// CreatedBy is the command which created the layer.
CreatedBy *string `json:"CreatedBy"`
// Author is the author of the build point.
Author *string `json:"Author"`
// Comment is a custom message set when creating the layer.
Comment *string `json:"Comment"`
// EmptyLayer is used to mark if the history item created a filesystem diff.
EmptyLayer *bool `json:"EmptyLayer"`
}
// Contains details about the image
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"`
Layers []*LayerSummary `json:"Layers"`
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"`
Vulnerabilities *ImageVulnerabilitySummary `json:"Vulnerabilities"`
}
type ImageVulnerabilitySummary struct {
MaxSeverity *string `json:"MaxSeverity"`
Count *int `json:"Count"`
}
type LayerHistory struct {
Layer *LayerSummary `json:"Layer"`
HistoryDescription *HistoryDescription `json:"HistoryDescription"`
}
// Contains details about the layer
type LayerSummary struct {
Size *string `json:"Size"`
Digest *string `json:"Digest"`
Score *int `json:"Score"`
}
// Contains details about the supported OS and architecture of the image
type OsArch struct {
Os *string `json:"Os"`
Arch *string `json:"Arch"`
}
// Contains the name of the package, the current installed version and the version where the CVE was fixed
type PackageInfo struct {
Name *string `json:"Name"`
InstalledVersion *string `json:"InstalledVersion"`
FixedVersion *string `json:"FixedVersion"`
}
// Contains details about the repo: a list of image summaries and a summary of the repo
type RepoInfo struct {
Images []*ImageSummary `json:"Images"`
Summary *RepoSummary `json:"Summary"`
}
// Contains details about the repo
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"`
DownloadCount *int `json:"DownloadCount"`
StarCount *int `json:"StarCount"`
IsBookmarked *bool `json:"IsBookmarked"`
}