mirror of
https://github.com/project-zot/zot.git
synced 2024-12-16 21:56:37 -05:00
chore: fix dependabot alerts (#1312)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
parent
e54c36db12
commit
917159143c
6 changed files with 150 additions and 95 deletions
2
.github/workflows/stale.yaml
vendored
2
.github/workflows/stale.yaml
vendored
|
@ -12,7 +12,7 @@ jobs:
|
|||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v7
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
|
||||
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
|
||||
|
|
6
go.mod
6
go.mod
|
@ -3,7 +3,7 @@ module zotregistry.io/zot
|
|||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/99designs/gqlgen v0.17.25
|
||||
github.com/99designs/gqlgen v0.17.27
|
||||
github.com/Masterminds/semver v1.5.0
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
|
||||
github.com/apex/log v1.9.0
|
||||
|
@ -41,7 +41,7 @@ require (
|
|||
github.com/spf13/cobra v1.6.1
|
||||
github.com/spf13/viper v1.15.0
|
||||
github.com/stretchr/testify v1.8.2
|
||||
github.com/swaggo/swag v1.8.10
|
||||
github.com/swaggo/swag v1.8.11
|
||||
github.com/vektah/gqlparser/v2 v2.5.1
|
||||
go.etcd.io/bbolt v1.3.7
|
||||
golang.org/x/crypto v0.7.0
|
||||
|
@ -58,7 +58,7 @@ require (
|
|||
github.com/opencontainers/distribution-spec/specs-go v0.0.0-20230117141039-067a0f5b0e25
|
||||
github.com/sigstore/cosign v1.13.1
|
||||
github.com/swaggo/http-swagger v1.3.4
|
||||
oras.land/oras-go/v2 v2.0.0
|
||||
oras.land/oras-go/v2 v2.0.2
|
||||
)
|
||||
|
||||
require (
|
||||
|
|
12
go.sum
12
go.sum
|
@ -216,8 +216,8 @@ contrib.go.opencensus.io/resource v0.1.1/go.mod h1:F361eGI91LCmW1I/Saf+rX0+OFcig
|
|||
cuelang.org/go v0.4.3 h1:W3oBBjDTm7+IZfCKZAmC8uDG0eYfJL4Pp/xbbCMKaVo=
|
||||
cuelang.org/go v0.4.3/go.mod h1:7805vR9H+VoBNdWFdI7jyDR3QLUPp4+naHfbcgp55HI=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
github.com/99designs/gqlgen v0.17.25 h1:5CAocr5i+dqY0lUR+Xu0InU81Ax/g+xsxKwOU8Glqy0=
|
||||
github.com/99designs/gqlgen v0.17.25/go.mod h1:i4rEatMrzzu6RXaHydq1nmEPZkb3bKQsnxNRHS4DQB4=
|
||||
github.com/99designs/gqlgen v0.17.27 h1:XPsaZiWY1lL2qqVYtBt37GzkyX7bBiVvda7k1buC/Ao=
|
||||
github.com/99designs/gqlgen v0.17.27/go.mod h1:i4rEatMrzzu6RXaHydq1nmEPZkb3bKQsnxNRHS4DQB4=
|
||||
github.com/AdaLogics/go-fuzz-headers v0.0.0-20210401092550-0a8691dafd0d/go.mod h1:CzsSbkDixRphAF5hS6wbMKq0eI6ccJRb7/A0M6JBnwg=
|
||||
github.com/AdaLogics/go-fuzz-headers v0.0.0-20211102141018-f7be0cbad29c h1:9K6I0yCgGSneuHCoIlJl0O09UjqqWduCwd+ZL1nHFWc=
|
||||
github.com/AdaLogics/go-fuzz-headers v0.0.0-20211102141018-f7be0cbad29c/go.mod h1:WpB7kf89yJUETZxQnP1kgYPNwlT2jjdDYUCoxVggM3g=
|
||||
|
@ -2138,8 +2138,8 @@ github.com/swaggo/files v0.0.0-20220610200504-28940afbdbfe h1:K8pHPVoTgxFJt1lXuI
|
|||
github.com/swaggo/files v0.0.0-20220610200504-28940afbdbfe/go.mod h1:lKJPbtWzJ9JhsTN1k1gZgleJWY/cqq0psdoMmaThG3w=
|
||||
github.com/swaggo/http-swagger v1.3.4 h1:q7t/XLx0n15H1Q9/tk3Y9L4n210XzJF5WtnDX64a5ww=
|
||||
github.com/swaggo/http-swagger v1.3.4/go.mod h1:9dAh0unqMBAlbp1uE2Uc2mQTxNMU/ha4UbucIg1MFkQ=
|
||||
github.com/swaggo/swag v1.8.10 h1:eExW4bFa52WOjqRzRD58bgWsWfdFJso50lpbeTcmTfo=
|
||||
github.com/swaggo/swag v1.8.10/go.mod h1:ezQVUUhly8dludpVk+/PuwJWvLLanB13ygV5Pr9enSk=
|
||||
github.com/swaggo/swag v1.8.11 h1:Fp1dNNtDvbCf+8kvehZbHQnlF6AxHGjmw6H/xAMrZfY=
|
||||
github.com/swaggo/swag v1.8.11/go.mod h1:2GXgpNI9iy5OdsYWu8zXfRAGnOAPxYxTWTyM0XOTYZQ=
|
||||
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
||||
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
||||
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI=
|
||||
|
@ -3354,8 +3354,8 @@ modernc.org/z v1.5.1 h1:RTNHdsrOpeoSeOF4FbzTo8gBYByaJ5xT7NgZ9ZqRiJM=
|
|||
modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8=
|
||||
oras.land/oras-go v1.2.0 h1:yoKosVIbsPoFMqAIFHTnrmOuafHal+J/r+I5bdbVWu4=
|
||||
oras.land/oras-go v1.2.0/go.mod h1:pFNs7oHp2dYsYMSS82HaX5l4mpnGO7hbpPN6EWH2ltc=
|
||||
oras.land/oras-go/v2 v2.0.0 h1:+LRAz92WF7AvYQsQjPEAIw3Xb2zPPhuydjpi4pIHmc0=
|
||||
oras.land/oras-go/v2 v2.0.0/go.mod h1:iVExH1NxrccIxjsiq17L91WCZ4KIw6jVQyCLsZsu1gc=
|
||||
oras.land/oras-go/v2 v2.0.2 h1:3aSQdJ7EUC0ft2e9PjJB9Jzastz5ojPA4LzZ3Q4YbUc=
|
||||
oras.land/oras-go/v2 v2.0.2/go.mod h1:PWnWc/Kyyg7wUTUsDHshrsJkzuxXzreeMd6NrfdnFSo=
|
||||
pack.ag/amqp v0.11.2/go.mod h1:4/cbmt4EJXSKlG6LCfWHoqmN0uFdy5i/+YFz+fTfhV4=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
|
|
|
@ -9,6 +9,7 @@ import (
|
|||
"fmt"
|
||||
"strconv"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/99designs/gqlgen/graphql"
|
||||
|
@ -5070,6 +5071,7 @@ func (ec *executionContext) _Query_CVEListForImage(ctx context.Context, field gr
|
|||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
if !graphql.HasFieldError(ctx, fc) {
|
||||
|
@ -5132,6 +5134,7 @@ func (ec *executionContext) _Query_ImageListForCVE(ctx context.Context, field gr
|
|||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
if !graphql.HasFieldError(ctx, fc) {
|
||||
|
@ -5192,6 +5195,7 @@ func (ec *executionContext) _Query_ImageListWithCVEFixed(ctx context.Context, fi
|
|||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
if !graphql.HasFieldError(ctx, fc) {
|
||||
|
@ -5252,6 +5256,7 @@ func (ec *executionContext) _Query_ImageListForDigest(ctx context.Context, field
|
|||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
if !graphql.HasFieldError(ctx, fc) {
|
||||
|
@ -5312,6 +5317,7 @@ func (ec *executionContext) _Query_RepoListWithNewestImage(ctx context.Context,
|
|||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
if !graphql.HasFieldError(ctx, fc) {
|
||||
|
@ -5372,6 +5378,7 @@ func (ec *executionContext) _Query_ImageList(ctx context.Context, field graphql.
|
|||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
if !graphql.HasFieldError(ctx, fc) {
|
||||
|
@ -5432,6 +5439,7 @@ func (ec *executionContext) _Query_ExpandedRepoInfo(ctx context.Context, field g
|
|||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
if !graphql.HasFieldError(ctx, fc) {
|
||||
|
@ -5492,6 +5500,7 @@ func (ec *executionContext) _Query_GlobalSearch(ctx context.Context, field graph
|
|||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
if !graphql.HasFieldError(ctx, fc) {
|
||||
|
@ -5556,6 +5565,7 @@ func (ec *executionContext) _Query_DerivedImageList(ctx context.Context, field g
|
|||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
if !graphql.HasFieldError(ctx, fc) {
|
||||
|
@ -5616,6 +5626,7 @@ func (ec *executionContext) _Query_BaseImageList(ctx context.Context, field grap
|
|||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
if !graphql.HasFieldError(ctx, fc) {
|
||||
|
@ -5676,6 +5687,7 @@ func (ec *executionContext) _Query_Image(ctx context.Context, field graphql.Coll
|
|||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
if !graphql.HasFieldError(ctx, fc) {
|
||||
|
@ -5770,6 +5782,7 @@ func (ec *executionContext) _Query_Referrers(ctx context.Context, field graphql.
|
|||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
if !graphql.HasFieldError(ctx, fc) {
|
||||
|
@ -5836,6 +5849,7 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col
|
|||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
return graphql.Null
|
||||
|
@ -5909,6 +5923,7 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C
|
|||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
return graphql.Null
|
||||
|
@ -9228,6 +9243,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
|||
})
|
||||
|
||||
out := graphql.NewFieldSet(fields)
|
||||
var invalids uint32
|
||||
for i, field := range fields {
|
||||
innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{
|
||||
Object: field.Name,
|
||||
|
@ -9247,6 +9263,9 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
|||
}
|
||||
}()
|
||||
res = ec._Query_CVEListForImage(ctx, field)
|
||||
if res == graphql.Null {
|
||||
atomic.AddUint32(&invalids, 1)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
|
@ -9267,6 +9286,9 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
|||
}
|
||||
}()
|
||||
res = ec._Query_ImageListForCVE(ctx, field)
|
||||
if res == graphql.Null {
|
||||
atomic.AddUint32(&invalids, 1)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
|
@ -9287,6 +9309,9 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
|||
}
|
||||
}()
|
||||
res = ec._Query_ImageListWithCVEFixed(ctx, field)
|
||||
if res == graphql.Null {
|
||||
atomic.AddUint32(&invalids, 1)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
|
@ -9307,6 +9332,9 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
|||
}
|
||||
}()
|
||||
res = ec._Query_ImageListForDigest(ctx, field)
|
||||
if res == graphql.Null {
|
||||
atomic.AddUint32(&invalids, 1)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
|
@ -9327,6 +9355,9 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
|||
}
|
||||
}()
|
||||
res = ec._Query_RepoListWithNewestImage(ctx, field)
|
||||
if res == graphql.Null {
|
||||
atomic.AddUint32(&invalids, 1)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
|
@ -9347,6 +9378,9 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
|||
}
|
||||
}()
|
||||
res = ec._Query_ImageList(ctx, field)
|
||||
if res == graphql.Null {
|
||||
atomic.AddUint32(&invalids, 1)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
|
@ -9367,6 +9401,9 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
|||
}
|
||||
}()
|
||||
res = ec._Query_ExpandedRepoInfo(ctx, field)
|
||||
if res == graphql.Null {
|
||||
atomic.AddUint32(&invalids, 1)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
|
@ -9387,6 +9424,9 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
|||
}
|
||||
}()
|
||||
res = ec._Query_GlobalSearch(ctx, field)
|
||||
if res == graphql.Null {
|
||||
atomic.AddUint32(&invalids, 1)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
|
@ -9407,6 +9447,9 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
|||
}
|
||||
}()
|
||||
res = ec._Query_DerivedImageList(ctx, field)
|
||||
if res == graphql.Null {
|
||||
atomic.AddUint32(&invalids, 1)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
|
@ -9427,6 +9470,9 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
|||
}
|
||||
}()
|
||||
res = ec._Query_BaseImageList(ctx, field)
|
||||
if res == graphql.Null {
|
||||
atomic.AddUint32(&invalids, 1)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
|
@ -9447,6 +9493,9 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
|||
}
|
||||
}()
|
||||
res = ec._Query_Image(ctx, field)
|
||||
if res == graphql.Null {
|
||||
atomic.AddUint32(&invalids, 1)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
|
@ -9467,6 +9516,9 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
|||
}
|
||||
}()
|
||||
res = ec._Query_Referrers(ctx, field)
|
||||
if res == graphql.Null {
|
||||
atomic.AddUint32(&invalids, 1)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
|
@ -9494,6 +9546,9 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
|||
}
|
||||
}
|
||||
out.Dispatch()
|
||||
if invalids > 0 {
|
||||
return graphql.Null
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
|
|
|
@ -13,34 +13,34 @@ import (
|
|||
// not available in other fields.
|
||||
type Annotation struct {
|
||||
// Custom key
|
||||
Key *string `json:"Key"`
|
||||
Key *string `json:"Key,omitempty"`
|
||||
// Value associated with the custom key
|
||||
Value *string `json:"Value"`
|
||||
Value *string `json:"Value,omitempty"`
|
||||
}
|
||||
|
||||
// Contains various details about the CVE (Common Vulnerabilities and Exposures)
|
||||
// and a list of PackageInfo about the affected packages
|
||||
type Cve struct {
|
||||
// CVE ID
|
||||
ID *string `json:"Id"`
|
||||
ID *string `json:"Id,omitempty"`
|
||||
// A short title describing the CVE
|
||||
Title *string `json:"Title"`
|
||||
Title *string `json:"Title,omitempty"`
|
||||
// A detailed description of the CVE
|
||||
Description *string `json:"Description"`
|
||||
Description *string `json:"Description,omitempty"`
|
||||
// The impact the CVE has, one of "UNKNOWN", "LOW", "MEDIUM", "HIGH", "CRITICAL"
|
||||
Severity *string `json:"Severity"`
|
||||
Severity *string `json:"Severity,omitempty"`
|
||||
// Information on the packages in which the CVE was found
|
||||
PackageList []*PackageInfo `json:"PackageList"`
|
||||
PackageList []*PackageInfo `json:"PackageList,omitempty"`
|
||||
}
|
||||
|
||||
// Contains the tag of the image and a list of CVEs
|
||||
type CVEResultForImage struct {
|
||||
// Tag affected by the CVEs
|
||||
Tag *string `json:"Tag"`
|
||||
Tag *string `json:"Tag,omitempty"`
|
||||
// List of CVE objects which afect this specific image:tag
|
||||
CVEList []*Cve `json:"CVEList"`
|
||||
CVEList []*Cve `json:"CVEList,omitempty"`
|
||||
// The CVE pagination information, see PageInfo object for more details
|
||||
Page *PageInfo `json:"Page"`
|
||||
Page *PageInfo `json:"Page,omitempty"`
|
||||
}
|
||||
|
||||
// Apply various types of filters to the queries made for repositories and images
|
||||
|
@ -49,144 +49,144 @@ type CVEResultForImage struct {
|
|||
type Filter struct {
|
||||
// Only return images or repositories supporting the operating systems in the list
|
||||
// Should be values listed in the Go Language document https://go.dev/doc/install/source#environment
|
||||
Os []*string `json:"Os"`
|
||||
Os []*string `json:"Os,omitempty"`
|
||||
// Only return images or repositories supporting the build architectures in the list
|
||||
// Should be values listed in the Go Language document https://go.dev/doc/install/source#environment
|
||||
Arch []*string `json:"Arch"`
|
||||
Arch []*string `json:"Arch,omitempty"`
|
||||
// Only return images or repositories with at least one signature
|
||||
HasToBeSigned *bool `json:"HasToBeSigned"`
|
||||
HasToBeSigned *bool `json:"HasToBeSigned,omitempty"`
|
||||
}
|
||||
|
||||
// Search results, can contain images, repositories and layers
|
||||
type GlobalSearchResult struct {
|
||||
// Pagination information
|
||||
Page *PageInfo `json:"Page"`
|
||||
Page *PageInfo `json:"Page,omitempty"`
|
||||
// List of images matching the search criteria
|
||||
Images []*ImageSummary `json:"Images"`
|
||||
Images []*ImageSummary `json:"Images,omitempty"`
|
||||
// List of repositories matching the search criteria
|
||||
Repos []*RepoSummary `json:"Repos"`
|
||||
Repos []*RepoSummary `json:"Repos,omitempty"`
|
||||
// List of layers matching the search criteria
|
||||
// NOTE: the actual search logic for layers is not implemented at the moment
|
||||
Layers []*LayerSummary `json:"Layers"`
|
||||
Layers []*LayerSummary `json:"Layers,omitempty"`
|
||||
}
|
||||
|
||||
// Information on how a layer was created
|
||||
type HistoryDescription struct {
|
||||
// Created is the time when the layer was created.
|
||||
Created *time.Time `json:"Created"`
|
||||
Created *time.Time `json:"Created,omitempty"`
|
||||
// CreatedBy is the command which created the layer.
|
||||
CreatedBy *string `json:"CreatedBy"`
|
||||
CreatedBy *string `json:"CreatedBy,omitempty"`
|
||||
// Author is the author of the build point.
|
||||
Author *string `json:"Author"`
|
||||
Author *string `json:"Author,omitempty"`
|
||||
// Comment is a custom message set when creating the layer.
|
||||
Comment *string `json:"Comment"`
|
||||
Comment *string `json:"Comment,omitempty"`
|
||||
// EmptyLayer is used to mark if the history item created a filesystem diff.
|
||||
EmptyLayer *bool `json:"EmptyLayer"`
|
||||
EmptyLayer *bool `json:"EmptyLayer,omitempty"`
|
||||
}
|
||||
|
||||
// Details about a specific image, it is used by queries returning a list of images
|
||||
// We define an image as a pairing or a repository and a tag belonging to that repository
|
||||
type ImageSummary struct {
|
||||
// Name of the repository where the image is found
|
||||
RepoName *string `json:"RepoName"`
|
||||
RepoName *string `json:"RepoName,omitempty"`
|
||||
// Tag identifying the image within the repository
|
||||
Tag *string `json:"Tag"`
|
||||
Tag *string `json:"Tag,omitempty"`
|
||||
// The digest of the descriptor of this image
|
||||
Digest *string `json:"Digest"`
|
||||
Digest *string `json:"Digest,omitempty"`
|
||||
// The media type of the descriptor of this image
|
||||
MediaType *string `json:"MediaType"`
|
||||
MediaType *string `json:"MediaType,omitempty"`
|
||||
// List of manifests for all supported versions of the image for different operating systems and architectures
|
||||
Manifests []*ManifestSummary `json:"Manifests"`
|
||||
Manifests []*ManifestSummary `json:"Manifests,omitempty"`
|
||||
// Total size of the files associated with all images (manifest, config, layers)
|
||||
Size *string `json:"Size"`
|
||||
Size *string `json:"Size,omitempty"`
|
||||
// Number of downloads of the manifest of this image
|
||||
DownloadCount *int `json:"DownloadCount"`
|
||||
DownloadCount *int `json:"DownloadCount,omitempty"`
|
||||
// Timestamp of the last modification done to the image (from config or the last updated layer)
|
||||
LastUpdated *time.Time `json:"LastUpdated"`
|
||||
LastUpdated *time.Time `json:"LastUpdated,omitempty"`
|
||||
// Human-readable description of the software packaged in the image
|
||||
Description *string `json:"Description"`
|
||||
Description *string `json:"Description,omitempty"`
|
||||
// True if the image has a signature associated with it, false otherwise
|
||||
IsSigned *bool `json:"IsSigned"`
|
||||
IsSigned *bool `json:"IsSigned,omitempty"`
|
||||
// License(s) under which contained software is distributed as an SPDX License Expression
|
||||
Licenses *string `json:"Licenses"`
|
||||
Licenses *string `json:"Licenses,omitempty"`
|
||||
// Labels associated with this image
|
||||
// NOTE: currently this field is unused
|
||||
Labels *string `json:"Labels"`
|
||||
Labels *string `json:"Labels,omitempty"`
|
||||
// Human-readable title of the image
|
||||
Title *string `json:"Title"`
|
||||
Title *string `json:"Title,omitempty"`
|
||||
// URL to get source code for building the image
|
||||
Source *string `json:"Source"`
|
||||
Source *string `json:"Source,omitempty"`
|
||||
// URL to get documentation on the image
|
||||
Documentation *string `json:"Documentation"`
|
||||
Documentation *string `json:"Documentation,omitempty"`
|
||||
// Vendor associated with this image, the distributing entity, organization or individual
|
||||
Vendor *string `json:"Vendor"`
|
||||
Vendor *string `json:"Vendor,omitempty"`
|
||||
// Contact details of the people or organization responsible for the image
|
||||
Authors *string `json:"Authors"`
|
||||
Authors *string `json:"Authors,omitempty"`
|
||||
// Short summary of the identified CVEs
|
||||
Vulnerabilities *ImageVulnerabilitySummary `json:"Vulnerabilities"`
|
||||
Vulnerabilities *ImageVulnerabilitySummary `json:"Vulnerabilities,omitempty"`
|
||||
// Information about objects that reference this image
|
||||
Referrers []*Referrer `json:"Referrers"`
|
||||
Referrers []*Referrer `json:"Referrers,omitempty"`
|
||||
}
|
||||
|
||||
// Contains summary of vulnerabilities found in a specific image
|
||||
type ImageVulnerabilitySummary struct {
|
||||
// Maximum severity of all CVEs found in this image
|
||||
MaxSeverity *string `json:"MaxSeverity"`
|
||||
MaxSeverity *string `json:"MaxSeverity,omitempty"`
|
||||
// Count of all CVEs found in this image
|
||||
Count *int `json:"Count"`
|
||||
Count *int `json:"Count,omitempty"`
|
||||
}
|
||||
|
||||
// Information about how/when a layer was built
|
||||
type LayerHistory struct {
|
||||
// Information specific to the layer such as size and digest.
|
||||
Layer *LayerSummary `json:"Layer"`
|
||||
Layer *LayerSummary `json:"Layer,omitempty"`
|
||||
// Additional information about how the layer was created.
|
||||
HistoryDescription *HistoryDescription `json:"HistoryDescription"`
|
||||
HistoryDescription *HistoryDescription `json:"HistoryDescription,omitempty"`
|
||||
}
|
||||
|
||||
// Contains details about a specific layer which is part of an image
|
||||
type LayerSummary struct {
|
||||
// The size of the layer in bytes
|
||||
Size *string `json:"Size"`
|
||||
Size *string `json:"Size,omitempty"`
|
||||
// Digest of the layer content
|
||||
Digest *string `json:"Digest"`
|
||||
Digest *string `json:"Digest,omitempty"`
|
||||
}
|
||||
|
||||
// Details about a specific version of an image for a certain operating system and architecture.
|
||||
type ManifestSummary struct {
|
||||
// Digest of the manifest file associated with this image
|
||||
Digest *string `json:"Digest"`
|
||||
Digest *string `json:"Digest,omitempty"`
|
||||
// Digest of the config file associated with this image
|
||||
ConfigDigest *string `json:"ConfigDigest"`
|
||||
ConfigDigest *string `json:"ConfigDigest,omitempty"`
|
||||
// Timestamp of the last update to an image inside this repository
|
||||
LastUpdated *time.Time `json:"LastUpdated"`
|
||||
LastUpdated *time.Time `json:"LastUpdated,omitempty"`
|
||||
// Total size of the files associated with this manifest (manifest, config, layers)
|
||||
Size *string `json:"Size"`
|
||||
Size *string `json:"Size,omitempty"`
|
||||
// True if the manifest has a signature associated with it, false otherwise
|
||||
IsSigned *bool `json:"IsSigned"`
|
||||
IsSigned *bool `json:"IsSigned,omitempty"`
|
||||
// OS and architecture supported by this image
|
||||
Platform *Platform `json:"Platform"`
|
||||
Platform *Platform `json:"Platform,omitempty"`
|
||||
// Total numer of image manifest downloads from this repository
|
||||
DownloadCount *int `json:"DownloadCount"`
|
||||
DownloadCount *int `json:"DownloadCount,omitempty"`
|
||||
// List of layers matching the search criteria
|
||||
// NOTE: the actual search logic for layers is not implemented at the moment
|
||||
Layers []*LayerSummary `json:"Layers"`
|
||||
Layers []*LayerSummary `json:"Layers,omitempty"`
|
||||
// Information about the history of the specific image, see LayerHistory
|
||||
History []*LayerHistory `json:"History"`
|
||||
History []*LayerHistory `json:"History,omitempty"`
|
||||
// Short summary of the identified CVEs
|
||||
Vulnerabilities *ImageVulnerabilitySummary `json:"Vulnerabilities"`
|
||||
Vulnerabilities *ImageVulnerabilitySummary `json:"Vulnerabilities,omitempty"`
|
||||
// Information about objects that reference this image
|
||||
Referrers []*Referrer `json:"Referrers"`
|
||||
Referrers []*Referrer `json:"Referrers,omitempty"`
|
||||
}
|
||||
|
||||
// Contains the name of the package, the current installed version and the version where the CVE was fixed
|
||||
type PackageInfo struct {
|
||||
// Name of the package affected by a CVE
|
||||
Name *string `json:"Name"`
|
||||
Name *string `json:"Name,omitempty"`
|
||||
// Current version of the package, typically affected by the CVE
|
||||
InstalledVersion *string `json:"InstalledVersion"`
|
||||
InstalledVersion *string `json:"InstalledVersion,omitempty"`
|
||||
// Minimum version of the package in which the CVE is fixed
|
||||
FixedVersion *string `json:"FixedVersion"`
|
||||
FixedVersion *string `json:"FixedVersion,omitempty"`
|
||||
}
|
||||
|
||||
// Information on current page returned by the API
|
||||
|
@ -202,18 +202,18 @@ type PageInfo struct {
|
|||
type PageInput struct {
|
||||
// The maximum amount of results to return for this page
|
||||
// Negative values are not allowed
|
||||
Limit *int `json:"limit"`
|
||||
Limit *int `json:"limit,omitempty"`
|
||||
// The results page number you want to receive
|
||||
// Negative values are not allowed
|
||||
Offset *int `json:"offset"`
|
||||
Offset *int `json:"offset,omitempty"`
|
||||
// The criteria used to sort the results on the page
|
||||
SortBy *SortCriteria `json:"sortBy"`
|
||||
SortBy *SortCriteria `json:"sortBy,omitempty"`
|
||||
}
|
||||
|
||||
// Paginated list of ImageSummary objects
|
||||
type PaginatedImagesResult struct {
|
||||
// Information on the returned page
|
||||
Page *PageInfo `json:"Page"`
|
||||
Page *PageInfo `json:"Page,omitempty"`
|
||||
// List of images
|
||||
Results []*ImageSummary `json:"Results"`
|
||||
}
|
||||
|
@ -221,7 +221,7 @@ type PaginatedImagesResult struct {
|
|||
// Paginated list of RepoSummary objects
|
||||
type PaginatedReposResult struct {
|
||||
// Information on the returned page
|
||||
Page *PageInfo `json:"Page"`
|
||||
Page *PageInfo `json:"Page,omitempty"`
|
||||
// List of repositories
|
||||
Results []*RepoSummary `json:"Results"`
|
||||
}
|
||||
|
@ -230,24 +230,24 @@ type PaginatedReposResult struct {
|
|||
type Platform struct {
|
||||
// The name of the operating system which the image is built to run on,
|
||||
// Should be values listed in the Go Language document https://go.dev/doc/install/source#environment
|
||||
Os *string `json:"Os"`
|
||||
Os *string `json:"Os,omitempty"`
|
||||
// The name of the compilation architecture which the image is built to run on,
|
||||
// Should be values listed in the Go Language document https://go.dev/doc/install/source#environment
|
||||
Arch *string `json:"Arch"`
|
||||
Arch *string `json:"Arch,omitempty"`
|
||||
}
|
||||
|
||||
// A referrer is an object which has a reference to a another object
|
||||
type Referrer struct {
|
||||
// Referrer MediaType
|
||||
// See https://github.com/opencontainers/artifacts for more details
|
||||
MediaType *string `json:"MediaType"`
|
||||
MediaType *string `json:"MediaType,omitempty"`
|
||||
// Referrer ArtifactType
|
||||
// See https://github.com/opencontainers/artifacts for more details
|
||||
ArtifactType *string `json:"ArtifactType"`
|
||||
ArtifactType *string `json:"ArtifactType,omitempty"`
|
||||
// Total size of the referrer files in bytes
|
||||
Size *int `json:"Size"`
|
||||
Size *int `json:"Size,omitempty"`
|
||||
// Digest of the manifest file of the referrer
|
||||
Digest *string `json:"Digest"`
|
||||
Digest *string `json:"Digest,omitempty"`
|
||||
// A list of annotations associated with this referrer
|
||||
Annotations []*Annotation `json:"Annotations"`
|
||||
}
|
||||
|
@ -255,34 +255,34 @@ type Referrer struct {
|
|||
// Contains details about the repo: both general information on the repo, and the list of images
|
||||
type RepoInfo struct {
|
||||
// List of images in the repo
|
||||
Images []*ImageSummary `json:"Images"`
|
||||
Images []*ImageSummary `json:"Images,omitempty"`
|
||||
// Details about the repository itself
|
||||
Summary *RepoSummary `json:"Summary"`
|
||||
Summary *RepoSummary `json:"Summary,omitempty"`
|
||||
}
|
||||
|
||||
// Details of a specific repo, it is used by queries returning a list of repos
|
||||
type RepoSummary struct {
|
||||
// Name of the repository
|
||||
Name *string `json:"Name"`
|
||||
Name *string `json:"Name,omitempty"`
|
||||
// Timestamp of the last update to an image inside this repository
|
||||
LastUpdated *time.Time `json:"LastUpdated"`
|
||||
LastUpdated *time.Time `json:"LastUpdated,omitempty"`
|
||||
// Total size of the files within this repository
|
||||
Size *string `json:"Size"`
|
||||
Size *string `json:"Size,omitempty"`
|
||||
// List of platforms supported by this repository
|
||||
Platforms []*Platform `json:"Platforms"`
|
||||
Platforms []*Platform `json:"Platforms,omitempty"`
|
||||
// Vendors associated with this image, the distributing entities, organizations or individuals
|
||||
Vendors []*string `json:"Vendors"`
|
||||
Vendors []*string `json:"Vendors,omitempty"`
|
||||
// Details of the newest image inside the repository
|
||||
// NOTE: not the image with the `latest` tag, the one with the most recent created timestamp
|
||||
NewestImage *ImageSummary `json:"NewestImage"`
|
||||
NewestImage *ImageSummary `json:"NewestImage,omitempty"`
|
||||
// Total numer of image manifest downloads from this repository
|
||||
DownloadCount *int `json:"DownloadCount"`
|
||||
DownloadCount *int `json:"DownloadCount,omitempty"`
|
||||
// Number of stars attributed to this repository by users
|
||||
StarCount *int `json:"StarCount"`
|
||||
StarCount *int `json:"StarCount,omitempty"`
|
||||
// True if the repository is bookmarked by the current user, false otherwise
|
||||
IsBookmarked *bool `json:"IsBookmarked"`
|
||||
IsBookmarked *bool `json:"IsBookmarked,omitempty"`
|
||||
// True if the repository is stared by the current user, fale otherwise
|
||||
IsStarred *bool `json:"IsStarred"`
|
||||
IsStarred *bool `json:"IsStarred,omitempty"`
|
||||
}
|
||||
|
||||
// All sort criteria usable with pagination, some of these criteria applies only
|
||||
|
|
|
@ -2,7 +2,7 @@ package search
|
|||
|
||||
// This file will be automatically regenerated based on the schema, any resolver implementations
|
||||
// will be copied through when generating and any unknown code will be moved to the end.
|
||||
// Code generated by github.com/99designs/gqlgen version v0.17.25
|
||||
// Code generated by github.com/99designs/gqlgen version v0.17.27
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
|
Loading…
Reference in a new issue