|
1 | 1 | package types |
2 | 2 |
|
3 | 3 | type BaseImage struct { |
4 | | - DiffIds []string `graphql:"matches" json:"diff_ids,omitempty"` |
5 | | - Images []struct { |
6 | | - CreatedAt string `graphql:"createdAt" json:"created_at,omitempty"` |
7 | | - Digest string `graphql:"digest" json:"digest,omitempty"` |
8 | | - Repository struct { |
9 | | - Badge string `graphql:"badge" json:"badge,omitempty"` |
10 | | - Host string `graphql:"hostName" json:"host,omitempty"` |
11 | | - Repo string `graphql:"repoName" json:"repo,omitempty"` |
12 | | - SupportedTags []string `graphql:"supportedTags" json:"supported_tags,omitempty"` |
13 | | - PreferredTags []string `graphql:"preferredTags" json:"preferred_tags,omitempty"` |
14 | | - } `graphql:"repository" json:"repository"` |
15 | | - Tags []struct { |
16 | | - Current bool `graphql:"current" json:"current"` |
17 | | - Name string `graphql:"name" json:"name,omitempty"` |
18 | | - Supported bool `graphql:"supported" json:"supported"` |
19 | | - } `graphql:"tags" json:"tags,omitempty"` |
20 | | - DockerFile struct { |
21 | | - Commit struct { |
22 | | - Repository struct { |
23 | | - Org string `graphql:"orgName" json:"org,omitempty"` |
24 | | - Repo string `graphql:"repoName" json:"repo,omitempty"` |
25 | | - } `graphql:"repository" json:"repository,omitempty"` |
26 | | - Sha string `graphql:"sha" json:"sha,omitempty"` |
27 | | - } `json:"commit,omitempty"` |
28 | | - Path string `graphql:"path" json:"path,omitempty"` |
29 | | - } `graphql:"dockerFile" json:"docker_file,omitempty"` |
30 | | - PackageCount int `graphql:"packageCount" json:"package_count,omitempty"` |
31 | | - VulnerabilityReport struct { |
32 | | - Critical int `graphql:"critical" json:"critical,omitempty"` |
33 | | - High int `graphql:"high" json:"high,omitempty"` |
34 | | - Medium int `graphql:"medium" json:"medium,omitempty"` |
35 | | - Low int `graphql:"low" json:"low,omitempty"` |
36 | | - Unspecified int `graphql:"unspecified" json:"unspecified,omitempty"` |
37 | | - Total int `graphql:"total" json:"total,omitempty"` |
38 | | - } `graphql:"vulnerabilityReport" json:"vulnerability_report"` |
39 | | - } `graphql:"images" json:"images,omitempty"` |
| 4 | + CreatedAt string `graphql:"createdAt" json:"created_at,omitempty"` |
| 5 | + Digest string `graphql:"digest" json:"digest,omitempty"` |
| 6 | + Repository struct { |
| 7 | + Badge string `graphql:"badge" json:"badge,omitempty"` |
| 8 | + Host string `graphql:"hostName" json:"host,omitempty"` |
| 9 | + Repo string `graphql:"repoName" json:"repo,omitempty"` |
| 10 | + SupportedTags []string `graphql:"supportedTags" json:"supported_tags,omitempty"` |
| 11 | + PreferredTags []string `graphql:"preferredTags" json:"preferred_tags,omitempty"` |
| 12 | + } `graphql:"repository" json:"repository"` |
| 13 | + Tags []struct { |
| 14 | + Current bool `graphql:"current" json:"current"` |
| 15 | + Name string `graphql:"name" json:"name,omitempty"` |
| 16 | + Supported bool `graphql:"supported" json:"supported"` |
| 17 | + } `graphql:"tags" json:"tags,omitempty"` |
| 18 | + DockerFile struct { |
| 19 | + Commit struct { |
| 20 | + Repository struct { |
| 21 | + Org string `graphql:"orgName" json:"org,omitempty"` |
| 22 | + Repo string `graphql:"repoName" json:"repo,omitempty"` |
| 23 | + } `graphql:"repository" json:"repository,omitempty"` |
| 24 | + Sha string `graphql:"sha" json:"sha,omitempty"` |
| 25 | + } `json:"commit,omitempty"` |
| 26 | + Path string `graphql:"path" json:"path,omitempty"` |
| 27 | + } `graphql:"dockerFile" json:"docker_file,omitempty"` |
| 28 | + PackageCount int `graphql:"packageCount" json:"package_count,omitempty"` |
| 29 | + VulnerabilityReport struct { |
| 30 | + Critical int `graphql:"critical" json:"critical,omitempty"` |
| 31 | + High int `graphql:"high" json:"high,omitempty"` |
| 32 | + Medium int `graphql:"medium" json:"medium,omitempty"` |
| 33 | + Low int `graphql:"low" json:"low,omitempty"` |
| 34 | + Unspecified int `graphql:"unspecified" json:"unspecified,omitempty"` |
| 35 | + Total int `graphql:"total" json:"total,omitempty"` |
| 36 | + } `graphql:"vulnerabilityReport" json:"vulnerability_report"` |
| 37 | +} |
| 38 | + |
| 39 | +type BaseImageMatch struct { |
| 40 | + DiffIds []string `graphql:"matches" json:"diff_ids,omitempty"` |
| 41 | + Images []BaseImage `graphql:"images" json:"images,omitempty"` |
40 | 42 | } |
41 | 43 |
|
42 | 44 | type BaseImagesByDiffIdsQuery struct { |
43 | | - ImagesByDiffIds []BaseImage `graphql:"imagesByDiffIds(context: {}, diffIds: $diffIds)"` |
| 45 | + ImagesByDiffIds []BaseImageMatch `graphql:"imagesByDiffIds(context: {}, diffIds: $diffIds)"` |
| 46 | +} |
| 47 | + |
| 48 | +type ImageByDigestQuery struct { |
| 49 | + ImageDetailsByDigest BaseImage `graphql:"imageDetailsByDigest(context: {}, digest: $digest, platform: {os: $os, architecture: $architecture, variant: $variant})"` |
44 | 50 | } |
0 commit comments