mirror of
https://github.com/project-zot/zot.git
synced 2024-12-23 22:27:35 -05:00
7517f2a5bb
* list all images that are base images for the given image + zli command Signed-off-by: Lisca Ana-Roberta <ana.kagome@yahoo.com> * Fix a failing test The test expected the image size to be the size of the layer, not the manifest+config+layer Signed-off-by: Andrei Aaron <andaaron@cisco.com> Signed-off-by: Lisca Ana-Roberta <ana.kagome@yahoo.com> Signed-off-by: Andrei Aaron <andaaron@cisco.com> Co-authored-by: Lisca Ana-Roberta <ana.kagome@yahoo.com>
8281 lines
244 KiB
Go
8281 lines
244 KiB
Go
// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
|
|
|
|
package gql_generated
|
|
|
|
import (
|
|
"bytes"
|
|
"context"
|
|
"errors"
|
|
"fmt"
|
|
"strconv"
|
|
"sync"
|
|
"sync/atomic"
|
|
"time"
|
|
|
|
"github.com/99designs/gqlgen/graphql"
|
|
"github.com/99designs/gqlgen/graphql/introspection"
|
|
gqlparser "github.com/vektah/gqlparser/v2"
|
|
"github.com/vektah/gqlparser/v2/ast"
|
|
)
|
|
|
|
// region ************************** generated!.gotpl **************************
|
|
|
|
// NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
|
|
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema {
|
|
return &executableSchema{
|
|
resolvers: cfg.Resolvers,
|
|
directives: cfg.Directives,
|
|
complexity: cfg.Complexity,
|
|
}
|
|
}
|
|
|
|
type Config struct {
|
|
Resolvers ResolverRoot
|
|
Directives DirectiveRoot
|
|
Complexity ComplexityRoot
|
|
}
|
|
|
|
type ResolverRoot interface {
|
|
Query() QueryResolver
|
|
}
|
|
|
|
type DirectiveRoot struct {
|
|
}
|
|
|
|
type ComplexityRoot struct {
|
|
CVE struct {
|
|
Description func(childComplexity int) int
|
|
ID func(childComplexity int) int
|
|
PackageList func(childComplexity int) int
|
|
Severity func(childComplexity int) int
|
|
Title func(childComplexity int) int
|
|
}
|
|
|
|
CVEResultForImage struct {
|
|
CVEList func(childComplexity int) int
|
|
Tag func(childComplexity int) int
|
|
}
|
|
|
|
GlobalSearchResult struct {
|
|
Images func(childComplexity int) int
|
|
Layers func(childComplexity int) int
|
|
Repos func(childComplexity int) int
|
|
}
|
|
|
|
HistoryDescription struct {
|
|
Author func(childComplexity int) int
|
|
Comment func(childComplexity int) int
|
|
Created func(childComplexity int) int
|
|
CreatedBy func(childComplexity int) int
|
|
EmptyLayer func(childComplexity int) int
|
|
}
|
|
|
|
ImageSummary struct {
|
|
ConfigDigest func(childComplexity int) int
|
|
Description func(childComplexity int) int
|
|
Digest func(childComplexity int) int
|
|
Documentation func(childComplexity int) int
|
|
DownloadCount func(childComplexity int) int
|
|
History func(childComplexity int) int
|
|
IsSigned func(childComplexity int) int
|
|
Labels func(childComplexity int) int
|
|
LastUpdated func(childComplexity int) int
|
|
Layers func(childComplexity int) int
|
|
Licenses func(childComplexity int) int
|
|
Platform func(childComplexity int) int
|
|
RepoName func(childComplexity int) int
|
|
Score func(childComplexity int) int
|
|
Size func(childComplexity int) int
|
|
Source func(childComplexity int) int
|
|
Tag func(childComplexity int) int
|
|
Title func(childComplexity int) int
|
|
Vendor func(childComplexity int) int
|
|
}
|
|
|
|
LayerHistory struct {
|
|
HistoryDescription func(childComplexity int) int
|
|
Layer func(childComplexity int) int
|
|
}
|
|
|
|
LayerSummary struct {
|
|
Digest func(childComplexity int) int
|
|
Score func(childComplexity int) int
|
|
Size func(childComplexity int) int
|
|
}
|
|
|
|
OsArch struct {
|
|
Arch func(childComplexity int) int
|
|
Os func(childComplexity int) int
|
|
}
|
|
|
|
PackageInfo struct {
|
|
FixedVersion func(childComplexity int) int
|
|
InstalledVersion func(childComplexity int) int
|
|
Name func(childComplexity int) int
|
|
}
|
|
|
|
Query struct {
|
|
BaseImageList func(childComplexity int, image string) int
|
|
CVEListForImage func(childComplexity int, image string) int
|
|
ExpandedRepoInfo func(childComplexity int, repo string) int
|
|
GlobalSearch func(childComplexity int, query string) int
|
|
ImageList func(childComplexity int, repo string) int
|
|
ImageListForCve func(childComplexity int, id string) int
|
|
ImageListForDigest func(childComplexity int, id string) int
|
|
ImageListWithCVEFixed func(childComplexity int, id string, image string) int
|
|
RepoListWithNewestImage func(childComplexity int) int
|
|
}
|
|
|
|
RepoInfo struct {
|
|
Images func(childComplexity int) int
|
|
Summary func(childComplexity int) int
|
|
}
|
|
|
|
RepoSummary struct {
|
|
DownloadCount func(childComplexity int) int
|
|
IsBookmarked func(childComplexity int) int
|
|
LastUpdated func(childComplexity int) int
|
|
Name func(childComplexity int) int
|
|
NewestImage func(childComplexity int) int
|
|
Platforms func(childComplexity int) int
|
|
Score func(childComplexity int) int
|
|
Size func(childComplexity int) int
|
|
StarCount func(childComplexity int) int
|
|
Vendors func(childComplexity int) int
|
|
}
|
|
}
|
|
|
|
type QueryResolver interface {
|
|
CVEListForImage(ctx context.Context, image string) (*CVEResultForImage, error)
|
|
ImageListForCve(ctx context.Context, id string) ([]*ImageSummary, error)
|
|
ImageListWithCVEFixed(ctx context.Context, id string, image string) ([]*ImageSummary, error)
|
|
ImageListForDigest(ctx context.Context, id string) ([]*ImageSummary, error)
|
|
RepoListWithNewestImage(ctx context.Context) ([]*RepoSummary, error)
|
|
ImageList(ctx context.Context, repo string) ([]*ImageSummary, error)
|
|
ExpandedRepoInfo(ctx context.Context, repo string) (*RepoInfo, error)
|
|
GlobalSearch(ctx context.Context, query string) (*GlobalSearchResult, error)
|
|
BaseImageList(ctx context.Context, image string) ([]*ImageSummary, error)
|
|
}
|
|
|
|
type executableSchema struct {
|
|
resolvers ResolverRoot
|
|
directives DirectiveRoot
|
|
complexity ComplexityRoot
|
|
}
|
|
|
|
func (e *executableSchema) Schema() *ast.Schema {
|
|
return parsedSchema
|
|
}
|
|
|
|
func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
|
|
ec := executionContext{nil, e}
|
|
_ = ec
|
|
switch typeName + "." + field {
|
|
|
|
case "CVE.Description":
|
|
if e.complexity.CVE.Description == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.CVE.Description(childComplexity), true
|
|
|
|
case "CVE.Id":
|
|
if e.complexity.CVE.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.CVE.ID(childComplexity), true
|
|
|
|
case "CVE.PackageList":
|
|
if e.complexity.CVE.PackageList == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.CVE.PackageList(childComplexity), true
|
|
|
|
case "CVE.Severity":
|
|
if e.complexity.CVE.Severity == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.CVE.Severity(childComplexity), true
|
|
|
|
case "CVE.Title":
|
|
if e.complexity.CVE.Title == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.CVE.Title(childComplexity), true
|
|
|
|
case "CVEResultForImage.CVEList":
|
|
if e.complexity.CVEResultForImage.CVEList == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.CVEResultForImage.CVEList(childComplexity), true
|
|
|
|
case "CVEResultForImage.Tag":
|
|
if e.complexity.CVEResultForImage.Tag == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.CVEResultForImage.Tag(childComplexity), true
|
|
|
|
case "GlobalSearchResult.Images":
|
|
if e.complexity.GlobalSearchResult.Images == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.GlobalSearchResult.Images(childComplexity), true
|
|
|
|
case "GlobalSearchResult.Layers":
|
|
if e.complexity.GlobalSearchResult.Layers == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.GlobalSearchResult.Layers(childComplexity), true
|
|
|
|
case "GlobalSearchResult.Repos":
|
|
if e.complexity.GlobalSearchResult.Repos == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.GlobalSearchResult.Repos(childComplexity), true
|
|
|
|
case "HistoryDescription.Author":
|
|
if e.complexity.HistoryDescription.Author == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.HistoryDescription.Author(childComplexity), true
|
|
|
|
case "HistoryDescription.Comment":
|
|
if e.complexity.HistoryDescription.Comment == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.HistoryDescription.Comment(childComplexity), true
|
|
|
|
case "HistoryDescription.Created":
|
|
if e.complexity.HistoryDescription.Created == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.HistoryDescription.Created(childComplexity), true
|
|
|
|
case "HistoryDescription.CreatedBy":
|
|
if e.complexity.HistoryDescription.CreatedBy == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.HistoryDescription.CreatedBy(childComplexity), true
|
|
|
|
case "HistoryDescription.EmptyLayer":
|
|
if e.complexity.HistoryDescription.EmptyLayer == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.HistoryDescription.EmptyLayer(childComplexity), true
|
|
|
|
case "ImageSummary.ConfigDigest":
|
|
if e.complexity.ImageSummary.ConfigDigest == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ImageSummary.ConfigDigest(childComplexity), true
|
|
|
|
case "ImageSummary.Description":
|
|
if e.complexity.ImageSummary.Description == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ImageSummary.Description(childComplexity), true
|
|
|
|
case "ImageSummary.Digest":
|
|
if e.complexity.ImageSummary.Digest == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ImageSummary.Digest(childComplexity), true
|
|
|
|
case "ImageSummary.Documentation":
|
|
if e.complexity.ImageSummary.Documentation == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ImageSummary.Documentation(childComplexity), true
|
|
|
|
case "ImageSummary.DownloadCount":
|
|
if e.complexity.ImageSummary.DownloadCount == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ImageSummary.DownloadCount(childComplexity), true
|
|
|
|
case "ImageSummary.History":
|
|
if e.complexity.ImageSummary.History == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ImageSummary.History(childComplexity), true
|
|
|
|
case "ImageSummary.IsSigned":
|
|
if e.complexity.ImageSummary.IsSigned == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ImageSummary.IsSigned(childComplexity), true
|
|
|
|
case "ImageSummary.Labels":
|
|
if e.complexity.ImageSummary.Labels == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ImageSummary.Labels(childComplexity), true
|
|
|
|
case "ImageSummary.LastUpdated":
|
|
if e.complexity.ImageSummary.LastUpdated == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ImageSummary.LastUpdated(childComplexity), true
|
|
|
|
case "ImageSummary.Layers":
|
|
if e.complexity.ImageSummary.Layers == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ImageSummary.Layers(childComplexity), true
|
|
|
|
case "ImageSummary.Licenses":
|
|
if e.complexity.ImageSummary.Licenses == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ImageSummary.Licenses(childComplexity), true
|
|
|
|
case "ImageSummary.Platform":
|
|
if e.complexity.ImageSummary.Platform == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ImageSummary.Platform(childComplexity), true
|
|
|
|
case "ImageSummary.RepoName":
|
|
if e.complexity.ImageSummary.RepoName == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ImageSummary.RepoName(childComplexity), true
|
|
|
|
case "ImageSummary.Score":
|
|
if e.complexity.ImageSummary.Score == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ImageSummary.Score(childComplexity), true
|
|
|
|
case "ImageSummary.Size":
|
|
if e.complexity.ImageSummary.Size == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ImageSummary.Size(childComplexity), true
|
|
|
|
case "ImageSummary.Source":
|
|
if e.complexity.ImageSummary.Source == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ImageSummary.Source(childComplexity), true
|
|
|
|
case "ImageSummary.Tag":
|
|
if e.complexity.ImageSummary.Tag == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ImageSummary.Tag(childComplexity), true
|
|
|
|
case "ImageSummary.Title":
|
|
if e.complexity.ImageSummary.Title == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ImageSummary.Title(childComplexity), true
|
|
|
|
case "ImageSummary.Vendor":
|
|
if e.complexity.ImageSummary.Vendor == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ImageSummary.Vendor(childComplexity), true
|
|
|
|
case "LayerHistory.HistoryDescription":
|
|
if e.complexity.LayerHistory.HistoryDescription == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.LayerHistory.HistoryDescription(childComplexity), true
|
|
|
|
case "LayerHistory.Layer":
|
|
if e.complexity.LayerHistory.Layer == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.LayerHistory.Layer(childComplexity), true
|
|
|
|
case "LayerSummary.Digest":
|
|
if e.complexity.LayerSummary.Digest == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.LayerSummary.Digest(childComplexity), true
|
|
|
|
case "LayerSummary.Score":
|
|
if e.complexity.LayerSummary.Score == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.LayerSummary.Score(childComplexity), true
|
|
|
|
case "LayerSummary.Size":
|
|
if e.complexity.LayerSummary.Size == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.LayerSummary.Size(childComplexity), true
|
|
|
|
case "OsArch.Arch":
|
|
if e.complexity.OsArch.Arch == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.OsArch.Arch(childComplexity), true
|
|
|
|
case "OsArch.Os":
|
|
if e.complexity.OsArch.Os == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.OsArch.Os(childComplexity), true
|
|
|
|
case "PackageInfo.FixedVersion":
|
|
if e.complexity.PackageInfo.FixedVersion == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.PackageInfo.FixedVersion(childComplexity), true
|
|
|
|
case "PackageInfo.InstalledVersion":
|
|
if e.complexity.PackageInfo.InstalledVersion == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.PackageInfo.InstalledVersion(childComplexity), true
|
|
|
|
case "PackageInfo.Name":
|
|
if e.complexity.PackageInfo.Name == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.PackageInfo.Name(childComplexity), true
|
|
|
|
case "Query.BaseImageList":
|
|
if e.complexity.Query.BaseImageList == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_BaseImageList_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.BaseImageList(childComplexity, args["image"].(string)), true
|
|
|
|
case "Query.CVEListForImage":
|
|
if e.complexity.Query.CVEListForImage == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_CVEListForImage_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.CVEListForImage(childComplexity, args["image"].(string)), true
|
|
|
|
case "Query.ExpandedRepoInfo":
|
|
if e.complexity.Query.ExpandedRepoInfo == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_ExpandedRepoInfo_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.ExpandedRepoInfo(childComplexity, args["repo"].(string)), true
|
|
|
|
case "Query.GlobalSearch":
|
|
if e.complexity.Query.GlobalSearch == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_GlobalSearch_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.GlobalSearch(childComplexity, args["query"].(string)), true
|
|
|
|
case "Query.ImageList":
|
|
if e.complexity.Query.ImageList == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_ImageList_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.ImageList(childComplexity, args["repo"].(string)), true
|
|
|
|
case "Query.ImageListForCVE":
|
|
if e.complexity.Query.ImageListForCve == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_ImageListForCVE_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.ImageListForCve(childComplexity, args["id"].(string)), true
|
|
|
|
case "Query.ImageListForDigest":
|
|
if e.complexity.Query.ImageListForDigest == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_ImageListForDigest_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.ImageListForDigest(childComplexity, args["id"].(string)), true
|
|
|
|
case "Query.ImageListWithCVEFixed":
|
|
if e.complexity.Query.ImageListWithCVEFixed == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_ImageListWithCVEFixed_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.ImageListWithCVEFixed(childComplexity, args["id"].(string), args["image"].(string)), true
|
|
|
|
case "Query.RepoListWithNewestImage":
|
|
if e.complexity.Query.RepoListWithNewestImage == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Query.RepoListWithNewestImage(childComplexity), true
|
|
|
|
case "RepoInfo.Images":
|
|
if e.complexity.RepoInfo.Images == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.RepoInfo.Images(childComplexity), true
|
|
|
|
case "RepoInfo.Summary":
|
|
if e.complexity.RepoInfo.Summary == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.RepoInfo.Summary(childComplexity), true
|
|
|
|
case "RepoSummary.DownloadCount":
|
|
if e.complexity.RepoSummary.DownloadCount == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.RepoSummary.DownloadCount(childComplexity), true
|
|
|
|
case "RepoSummary.IsBookmarked":
|
|
if e.complexity.RepoSummary.IsBookmarked == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.RepoSummary.IsBookmarked(childComplexity), true
|
|
|
|
case "RepoSummary.LastUpdated":
|
|
if e.complexity.RepoSummary.LastUpdated == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.RepoSummary.LastUpdated(childComplexity), true
|
|
|
|
case "RepoSummary.Name":
|
|
if e.complexity.RepoSummary.Name == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.RepoSummary.Name(childComplexity), true
|
|
|
|
case "RepoSummary.NewestImage":
|
|
if e.complexity.RepoSummary.NewestImage == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.RepoSummary.NewestImage(childComplexity), true
|
|
|
|
case "RepoSummary.Platforms":
|
|
if e.complexity.RepoSummary.Platforms == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.RepoSummary.Platforms(childComplexity), true
|
|
|
|
case "RepoSummary.Score":
|
|
if e.complexity.RepoSummary.Score == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.RepoSummary.Score(childComplexity), true
|
|
|
|
case "RepoSummary.Size":
|
|
if e.complexity.RepoSummary.Size == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.RepoSummary.Size(childComplexity), true
|
|
|
|
case "RepoSummary.StarCount":
|
|
if e.complexity.RepoSummary.StarCount == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.RepoSummary.StarCount(childComplexity), true
|
|
|
|
case "RepoSummary.Vendors":
|
|
if e.complexity.RepoSummary.Vendors == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.RepoSummary.Vendors(childComplexity), true
|
|
|
|
}
|
|
return 0, false
|
|
}
|
|
|
|
func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
|
|
rc := graphql.GetOperationContext(ctx)
|
|
ec := executionContext{rc, e}
|
|
inputUnmarshalMap := graphql.BuildUnmarshalerMap()
|
|
first := true
|
|
|
|
switch rc.Operation.Operation {
|
|
case ast.Query:
|
|
return func(ctx context.Context) *graphql.Response {
|
|
if !first {
|
|
return nil
|
|
}
|
|
first = false
|
|
ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap)
|
|
data := ec._Query(ctx, rc.Operation.SelectionSet)
|
|
var buf bytes.Buffer
|
|
data.MarshalGQL(&buf)
|
|
|
|
return &graphql.Response{
|
|
Data: buf.Bytes(),
|
|
}
|
|
}
|
|
|
|
default:
|
|
return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation"))
|
|
}
|
|
}
|
|
|
|
type executionContext struct {
|
|
*graphql.OperationContext
|
|
*executableSchema
|
|
}
|
|
|
|
func (ec *executionContext) introspectSchema() (*introspection.Schema, error) {
|
|
if ec.DisableIntrospection {
|
|
return nil, errors.New("introspection disabled")
|
|
}
|
|
return introspection.WrapSchema(parsedSchema), nil
|
|
}
|
|
|
|
func (ec *executionContext) introspectType(name string) (*introspection.Type, error) {
|
|
if ec.DisableIntrospection {
|
|
return nil, errors.New("introspection disabled")
|
|
}
|
|
return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil
|
|
}
|
|
|
|
var sources = []*ast.Source{
|
|
{Name: "../schema.graphql", Input: `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 {
|
|
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
|
|
Labels: String
|
|
Title: String
|
|
Source: String
|
|
Documentation: String
|
|
History: [LayerHistory]
|
|
}
|
|
|
|
# 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
|
|
DownloadCount: Int
|
|
StarCount: Int
|
|
IsBookmarked: 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 HistoryDescription {
|
|
Created: Time
|
|
"""
|
|
CreatedBy is the command which created the layer.
|
|
"""
|
|
CreatedBy: String
|
|
"""
|
|
Author is the author of the build point.
|
|
"""
|
|
Author: String
|
|
"""
|
|
Comment is a custom message set when creating the layer.
|
|
"""
|
|
Comment: String
|
|
"""
|
|
EmptyLayer is used to mark if the history item created a filesystem diff.
|
|
"""
|
|
EmptyLayer: Boolean
|
|
}
|
|
|
|
type LayerHistory {
|
|
Layer: LayerSummary
|
|
HistoryDescription: HistoryDescription
|
|
}
|
|
|
|
type OsArch {
|
|
Os: String
|
|
Arch: String
|
|
}
|
|
|
|
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!): GlobalSearchResult!
|
|
BaseImageList(image: String!): [ImageSummary!]
|
|
}`, BuiltIn: false},
|
|
}
|
|
var parsedSchema = gqlparser.MustLoadSchema(sources...)
|
|
|
|
// endregion ************************** generated!.gotpl **************************
|
|
|
|
// region ***************************** args.gotpl *****************************
|
|
|
|
func (ec *executionContext) field_Query_BaseImageList_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["image"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("image"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["image"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_CVEListForImage_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["image"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("image"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["image"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_ExpandedRepoInfo_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["repo"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repo"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["repo"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_GlobalSearch_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["query"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("query"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["query"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_ImageListForCVE_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["id"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["id"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_ImageListForDigest_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["id"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["id"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_ImageListWithCVEFixed_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["id"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["id"] = arg0
|
|
var arg1 string
|
|
if tmp, ok := rawArgs["image"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("image"))
|
|
arg1, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["image"] = arg1
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_ImageList_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["repo"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repo"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["repo"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["name"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["name"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 bool
|
|
if tmp, ok := rawArgs["includeDeprecated"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
|
|
arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["includeDeprecated"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 bool
|
|
if tmp, ok := rawArgs["includeDeprecated"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
|
|
arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["includeDeprecated"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
// endregion ***************************** args.gotpl *****************************
|
|
|
|
// region ************************** directives.gotpl **************************
|
|
|
|
// endregion ************************** directives.gotpl **************************
|
|
|
|
// region **************************** field.gotpl *****************************
|
|
|
|
func (ec *executionContext) _CVE_Id(ctx context.Context, field graphql.CollectedField, obj *Cve) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_CVE_Id(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.ID, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_CVE_Id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "CVE",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _CVE_Title(ctx context.Context, field graphql.CollectedField, obj *Cve) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_CVE_Title(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Title, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_CVE_Title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "CVE",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _CVE_Description(ctx context.Context, field graphql.CollectedField, obj *Cve) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_CVE_Description(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_CVE_Description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "CVE",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _CVE_Severity(ctx context.Context, field graphql.CollectedField, obj *Cve) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_CVE_Severity(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Severity, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_CVE_Severity(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "CVE",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _CVE_PackageList(ctx context.Context, field graphql.CollectedField, obj *Cve) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_CVE_PackageList(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.PackageList, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*PackageInfo)
|
|
fc.Result = res
|
|
return ec.marshalOPackageInfo2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐPackageInfo(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_CVE_PackageList(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "CVE",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "Name":
|
|
return ec.fieldContext_PackageInfo_Name(ctx, field)
|
|
case "InstalledVersion":
|
|
return ec.fieldContext_PackageInfo_InstalledVersion(ctx, field)
|
|
case "FixedVersion":
|
|
return ec.fieldContext_PackageInfo_FixedVersion(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type PackageInfo", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _CVEResultForImage_Tag(ctx context.Context, field graphql.CollectedField, obj *CVEResultForImage) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_CVEResultForImage_Tag(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Tag, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_CVEResultForImage_Tag(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "CVEResultForImage",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _CVEResultForImage_CVEList(ctx context.Context, field graphql.CollectedField, obj *CVEResultForImage) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_CVEResultForImage_CVEList(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.CVEList, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*Cve)
|
|
fc.Result = res
|
|
return ec.marshalOCVE2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐCve(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_CVEResultForImage_CVEList(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "CVEResultForImage",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "Id":
|
|
return ec.fieldContext_CVE_Id(ctx, field)
|
|
case "Title":
|
|
return ec.fieldContext_CVE_Title(ctx, field)
|
|
case "Description":
|
|
return ec.fieldContext_CVE_Description(ctx, field)
|
|
case "Severity":
|
|
return ec.fieldContext_CVE_Severity(ctx, field)
|
|
case "PackageList":
|
|
return ec.fieldContext_CVE_PackageList(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type CVE", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _GlobalSearchResult_Images(ctx context.Context, field graphql.CollectedField, obj *GlobalSearchResult) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_GlobalSearchResult_Images(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Images, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*ImageSummary)
|
|
fc.Result = res
|
|
return ec.marshalOImageSummary2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐImageSummary(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_GlobalSearchResult_Images(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "GlobalSearchResult",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "RepoName":
|
|
return ec.fieldContext_ImageSummary_RepoName(ctx, field)
|
|
case "Tag":
|
|
return ec.fieldContext_ImageSummary_Tag(ctx, field)
|
|
case "Digest":
|
|
return ec.fieldContext_ImageSummary_Digest(ctx, field)
|
|
case "ConfigDigest":
|
|
return ec.fieldContext_ImageSummary_ConfigDigest(ctx, field)
|
|
case "LastUpdated":
|
|
return ec.fieldContext_ImageSummary_LastUpdated(ctx, field)
|
|
case "IsSigned":
|
|
return ec.fieldContext_ImageSummary_IsSigned(ctx, field)
|
|
case "Size":
|
|
return ec.fieldContext_ImageSummary_Size(ctx, field)
|
|
case "Platform":
|
|
return ec.fieldContext_ImageSummary_Platform(ctx, field)
|
|
case "Vendor":
|
|
return ec.fieldContext_ImageSummary_Vendor(ctx, field)
|
|
case "Score":
|
|
return ec.fieldContext_ImageSummary_Score(ctx, field)
|
|
case "DownloadCount":
|
|
return ec.fieldContext_ImageSummary_DownloadCount(ctx, field)
|
|
case "Layers":
|
|
return ec.fieldContext_ImageSummary_Layers(ctx, field)
|
|
case "Description":
|
|
return ec.fieldContext_ImageSummary_Description(ctx, field)
|
|
case "Licenses":
|
|
return ec.fieldContext_ImageSummary_Licenses(ctx, field)
|
|
case "Labels":
|
|
return ec.fieldContext_ImageSummary_Labels(ctx, field)
|
|
case "Title":
|
|
return ec.fieldContext_ImageSummary_Title(ctx, field)
|
|
case "Source":
|
|
return ec.fieldContext_ImageSummary_Source(ctx, field)
|
|
case "Documentation":
|
|
return ec.fieldContext_ImageSummary_Documentation(ctx, field)
|
|
case "History":
|
|
return ec.fieldContext_ImageSummary_History(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type ImageSummary", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _GlobalSearchResult_Repos(ctx context.Context, field graphql.CollectedField, obj *GlobalSearchResult) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_GlobalSearchResult_Repos(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Repos, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*RepoSummary)
|
|
fc.Result = res
|
|
return ec.marshalORepoSummary2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐRepoSummary(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_GlobalSearchResult_Repos(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "GlobalSearchResult",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "Name":
|
|
return ec.fieldContext_RepoSummary_Name(ctx, field)
|
|
case "LastUpdated":
|
|
return ec.fieldContext_RepoSummary_LastUpdated(ctx, field)
|
|
case "Size":
|
|
return ec.fieldContext_RepoSummary_Size(ctx, field)
|
|
case "Platforms":
|
|
return ec.fieldContext_RepoSummary_Platforms(ctx, field)
|
|
case "Vendors":
|
|
return ec.fieldContext_RepoSummary_Vendors(ctx, field)
|
|
case "Score":
|
|
return ec.fieldContext_RepoSummary_Score(ctx, field)
|
|
case "NewestImage":
|
|
return ec.fieldContext_RepoSummary_NewestImage(ctx, field)
|
|
case "DownloadCount":
|
|
return ec.fieldContext_RepoSummary_DownloadCount(ctx, field)
|
|
case "StarCount":
|
|
return ec.fieldContext_RepoSummary_StarCount(ctx, field)
|
|
case "IsBookmarked":
|
|
return ec.fieldContext_RepoSummary_IsBookmarked(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type RepoSummary", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _GlobalSearchResult_Layers(ctx context.Context, field graphql.CollectedField, obj *GlobalSearchResult) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_GlobalSearchResult_Layers(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Layers, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*LayerSummary)
|
|
fc.Result = res
|
|
return ec.marshalOLayerSummary2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐLayerSummary(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_GlobalSearchResult_Layers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "GlobalSearchResult",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "Size":
|
|
return ec.fieldContext_LayerSummary_Size(ctx, field)
|
|
case "Digest":
|
|
return ec.fieldContext_LayerSummary_Digest(ctx, field)
|
|
case "Score":
|
|
return ec.fieldContext_LayerSummary_Score(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type LayerSummary", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _HistoryDescription_Created(ctx context.Context, field graphql.CollectedField, obj *HistoryDescription) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_HistoryDescription_Created(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Created, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*time.Time)
|
|
fc.Result = res
|
|
return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_HistoryDescription_Created(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "HistoryDescription",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type Time does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _HistoryDescription_CreatedBy(ctx context.Context, field graphql.CollectedField, obj *HistoryDescription) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_HistoryDescription_CreatedBy(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.CreatedBy, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_HistoryDescription_CreatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "HistoryDescription",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _HistoryDescription_Author(ctx context.Context, field graphql.CollectedField, obj *HistoryDescription) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_HistoryDescription_Author(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Author, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_HistoryDescription_Author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "HistoryDescription",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _HistoryDescription_Comment(ctx context.Context, field graphql.CollectedField, obj *HistoryDescription) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_HistoryDescription_Comment(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Comment, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_HistoryDescription_Comment(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "HistoryDescription",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _HistoryDescription_EmptyLayer(ctx context.Context, field graphql.CollectedField, obj *HistoryDescription) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_HistoryDescription_EmptyLayer(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.EmptyLayer, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*bool)
|
|
fc.Result = res
|
|
return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_HistoryDescription_EmptyLayer(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "HistoryDescription",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type Boolean does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _ImageSummary_RepoName(ctx context.Context, field graphql.CollectedField, obj *ImageSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_ImageSummary_RepoName(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.RepoName, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_ImageSummary_RepoName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "ImageSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _ImageSummary_Tag(ctx context.Context, field graphql.CollectedField, obj *ImageSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_ImageSummary_Tag(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Tag, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_ImageSummary_Tag(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "ImageSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _ImageSummary_Digest(ctx context.Context, field graphql.CollectedField, obj *ImageSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_ImageSummary_Digest(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Digest, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_ImageSummary_Digest(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "ImageSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _ImageSummary_ConfigDigest(ctx context.Context, field graphql.CollectedField, obj *ImageSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_ImageSummary_ConfigDigest(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.ConfigDigest, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_ImageSummary_ConfigDigest(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "ImageSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _ImageSummary_LastUpdated(ctx context.Context, field graphql.CollectedField, obj *ImageSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_ImageSummary_LastUpdated(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.LastUpdated, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*time.Time)
|
|
fc.Result = res
|
|
return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_ImageSummary_LastUpdated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "ImageSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type Time does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _ImageSummary_IsSigned(ctx context.Context, field graphql.CollectedField, obj *ImageSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_ImageSummary_IsSigned(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.IsSigned, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*bool)
|
|
fc.Result = res
|
|
return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_ImageSummary_IsSigned(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "ImageSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type Boolean does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _ImageSummary_Size(ctx context.Context, field graphql.CollectedField, obj *ImageSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_ImageSummary_Size(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Size, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_ImageSummary_Size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "ImageSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _ImageSummary_Platform(ctx context.Context, field graphql.CollectedField, obj *ImageSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_ImageSummary_Platform(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Platform, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*OsArch)
|
|
fc.Result = res
|
|
return ec.marshalOOsArch2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐOsArch(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_ImageSummary_Platform(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "ImageSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "Os":
|
|
return ec.fieldContext_OsArch_Os(ctx, field)
|
|
case "Arch":
|
|
return ec.fieldContext_OsArch_Arch(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type OsArch", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _ImageSummary_Vendor(ctx context.Context, field graphql.CollectedField, obj *ImageSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_ImageSummary_Vendor(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Vendor, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_ImageSummary_Vendor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "ImageSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _ImageSummary_Score(ctx context.Context, field graphql.CollectedField, obj *ImageSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_ImageSummary_Score(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Score, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*int)
|
|
fc.Result = res
|
|
return ec.marshalOInt2ᚖint(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_ImageSummary_Score(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "ImageSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type Int does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _ImageSummary_DownloadCount(ctx context.Context, field graphql.CollectedField, obj *ImageSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_ImageSummary_DownloadCount(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.DownloadCount, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*int)
|
|
fc.Result = res
|
|
return ec.marshalOInt2ᚖint(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_ImageSummary_DownloadCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "ImageSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type Int does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _ImageSummary_Layers(ctx context.Context, field graphql.CollectedField, obj *ImageSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_ImageSummary_Layers(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Layers, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*LayerSummary)
|
|
fc.Result = res
|
|
return ec.marshalOLayerSummary2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐLayerSummary(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_ImageSummary_Layers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "ImageSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "Size":
|
|
return ec.fieldContext_LayerSummary_Size(ctx, field)
|
|
case "Digest":
|
|
return ec.fieldContext_LayerSummary_Digest(ctx, field)
|
|
case "Score":
|
|
return ec.fieldContext_LayerSummary_Score(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type LayerSummary", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _ImageSummary_Description(ctx context.Context, field graphql.CollectedField, obj *ImageSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_ImageSummary_Description(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_ImageSummary_Description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "ImageSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _ImageSummary_Licenses(ctx context.Context, field graphql.CollectedField, obj *ImageSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_ImageSummary_Licenses(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Licenses, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_ImageSummary_Licenses(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "ImageSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _ImageSummary_Labels(ctx context.Context, field graphql.CollectedField, obj *ImageSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_ImageSummary_Labels(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Labels, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_ImageSummary_Labels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "ImageSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _ImageSummary_Title(ctx context.Context, field graphql.CollectedField, obj *ImageSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_ImageSummary_Title(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Title, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_ImageSummary_Title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "ImageSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _ImageSummary_Source(ctx context.Context, field graphql.CollectedField, obj *ImageSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_ImageSummary_Source(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Source, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_ImageSummary_Source(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "ImageSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _ImageSummary_Documentation(ctx context.Context, field graphql.CollectedField, obj *ImageSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_ImageSummary_Documentation(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Documentation, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_ImageSummary_Documentation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "ImageSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _ImageSummary_History(ctx context.Context, field graphql.CollectedField, obj *ImageSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_ImageSummary_History(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.History, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*LayerHistory)
|
|
fc.Result = res
|
|
return ec.marshalOLayerHistory2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐLayerHistory(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_ImageSummary_History(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "ImageSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "Layer":
|
|
return ec.fieldContext_LayerHistory_Layer(ctx, field)
|
|
case "HistoryDescription":
|
|
return ec.fieldContext_LayerHistory_HistoryDescription(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type LayerHistory", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _LayerHistory_Layer(ctx context.Context, field graphql.CollectedField, obj *LayerHistory) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_LayerHistory_Layer(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Layer, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*LayerSummary)
|
|
fc.Result = res
|
|
return ec.marshalOLayerSummary2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐLayerSummary(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_LayerHistory_Layer(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "LayerHistory",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "Size":
|
|
return ec.fieldContext_LayerSummary_Size(ctx, field)
|
|
case "Digest":
|
|
return ec.fieldContext_LayerSummary_Digest(ctx, field)
|
|
case "Score":
|
|
return ec.fieldContext_LayerSummary_Score(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type LayerSummary", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _LayerHistory_HistoryDescription(ctx context.Context, field graphql.CollectedField, obj *LayerHistory) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_LayerHistory_HistoryDescription(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.HistoryDescription, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*HistoryDescription)
|
|
fc.Result = res
|
|
return ec.marshalOHistoryDescription2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐHistoryDescription(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_LayerHistory_HistoryDescription(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "LayerHistory",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "Created":
|
|
return ec.fieldContext_HistoryDescription_Created(ctx, field)
|
|
case "CreatedBy":
|
|
return ec.fieldContext_HistoryDescription_CreatedBy(ctx, field)
|
|
case "Author":
|
|
return ec.fieldContext_HistoryDescription_Author(ctx, field)
|
|
case "Comment":
|
|
return ec.fieldContext_HistoryDescription_Comment(ctx, field)
|
|
case "EmptyLayer":
|
|
return ec.fieldContext_HistoryDescription_EmptyLayer(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type HistoryDescription", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _LayerSummary_Size(ctx context.Context, field graphql.CollectedField, obj *LayerSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_LayerSummary_Size(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Size, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_LayerSummary_Size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "LayerSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _LayerSummary_Digest(ctx context.Context, field graphql.CollectedField, obj *LayerSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_LayerSummary_Digest(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Digest, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_LayerSummary_Digest(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "LayerSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _LayerSummary_Score(ctx context.Context, field graphql.CollectedField, obj *LayerSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_LayerSummary_Score(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Score, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*int)
|
|
fc.Result = res
|
|
return ec.marshalOInt2ᚖint(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_LayerSummary_Score(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "LayerSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type Int does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _OsArch_Os(ctx context.Context, field graphql.CollectedField, obj *OsArch) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_OsArch_Os(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Os, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_OsArch_Os(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "OsArch",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _OsArch_Arch(ctx context.Context, field graphql.CollectedField, obj *OsArch) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_OsArch_Arch(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Arch, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_OsArch_Arch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "OsArch",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _PackageInfo_Name(ctx context.Context, field graphql.CollectedField, obj *PackageInfo) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_PackageInfo_Name(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_PackageInfo_Name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "PackageInfo",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _PackageInfo_InstalledVersion(ctx context.Context, field graphql.CollectedField, obj *PackageInfo) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_PackageInfo_InstalledVersion(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.InstalledVersion, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_PackageInfo_InstalledVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "PackageInfo",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _PackageInfo_FixedVersion(ctx context.Context, field graphql.CollectedField, obj *PackageInfo) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_PackageInfo_FixedVersion(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.FixedVersion, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_PackageInfo_FixedVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "PackageInfo",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _Query_CVEListForImage(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_Query_CVEListForImage(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().CVEListForImage(rctx, fc.Args["image"].(string))
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*CVEResultForImage)
|
|
fc.Result = res
|
|
return ec.marshalNCVEResultForImage2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐCVEResultForImage(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_Query_CVEListForImage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "Tag":
|
|
return ec.fieldContext_CVEResultForImage_Tag(ctx, field)
|
|
case "CVEList":
|
|
return ec.fieldContext_CVEResultForImage_CVEList(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type CVEResultForImage", field.Name)
|
|
},
|
|
}
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
err = ec.Recover(ctx, r)
|
|
ec.Error(ctx, err)
|
|
}
|
|
}()
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
if fc.Args, err = ec.field_Query_CVEListForImage_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
|
ec.Error(ctx, err)
|
|
return
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _Query_ImageListForCVE(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_Query_ImageListForCVE(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().ImageListForCve(rctx, fc.Args["id"].(string))
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*ImageSummary)
|
|
fc.Result = res
|
|
return ec.marshalOImageSummary2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐImageSummaryᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_Query_ImageListForCVE(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "RepoName":
|
|
return ec.fieldContext_ImageSummary_RepoName(ctx, field)
|
|
case "Tag":
|
|
return ec.fieldContext_ImageSummary_Tag(ctx, field)
|
|
case "Digest":
|
|
return ec.fieldContext_ImageSummary_Digest(ctx, field)
|
|
case "ConfigDigest":
|
|
return ec.fieldContext_ImageSummary_ConfigDigest(ctx, field)
|
|
case "LastUpdated":
|
|
return ec.fieldContext_ImageSummary_LastUpdated(ctx, field)
|
|
case "IsSigned":
|
|
return ec.fieldContext_ImageSummary_IsSigned(ctx, field)
|
|
case "Size":
|
|
return ec.fieldContext_ImageSummary_Size(ctx, field)
|
|
case "Platform":
|
|
return ec.fieldContext_ImageSummary_Platform(ctx, field)
|
|
case "Vendor":
|
|
return ec.fieldContext_ImageSummary_Vendor(ctx, field)
|
|
case "Score":
|
|
return ec.fieldContext_ImageSummary_Score(ctx, field)
|
|
case "DownloadCount":
|
|
return ec.fieldContext_ImageSummary_DownloadCount(ctx, field)
|
|
case "Layers":
|
|
return ec.fieldContext_ImageSummary_Layers(ctx, field)
|
|
case "Description":
|
|
return ec.fieldContext_ImageSummary_Description(ctx, field)
|
|
case "Licenses":
|
|
return ec.fieldContext_ImageSummary_Licenses(ctx, field)
|
|
case "Labels":
|
|
return ec.fieldContext_ImageSummary_Labels(ctx, field)
|
|
case "Title":
|
|
return ec.fieldContext_ImageSummary_Title(ctx, field)
|
|
case "Source":
|
|
return ec.fieldContext_ImageSummary_Source(ctx, field)
|
|
case "Documentation":
|
|
return ec.fieldContext_ImageSummary_Documentation(ctx, field)
|
|
case "History":
|
|
return ec.fieldContext_ImageSummary_History(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type ImageSummary", field.Name)
|
|
},
|
|
}
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
err = ec.Recover(ctx, r)
|
|
ec.Error(ctx, err)
|
|
}
|
|
}()
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
if fc.Args, err = ec.field_Query_ImageListForCVE_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
|
ec.Error(ctx, err)
|
|
return
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _Query_ImageListWithCVEFixed(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_Query_ImageListWithCVEFixed(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().ImageListWithCVEFixed(rctx, fc.Args["id"].(string), fc.Args["image"].(string))
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*ImageSummary)
|
|
fc.Result = res
|
|
return ec.marshalOImageSummary2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐImageSummaryᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_Query_ImageListWithCVEFixed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "RepoName":
|
|
return ec.fieldContext_ImageSummary_RepoName(ctx, field)
|
|
case "Tag":
|
|
return ec.fieldContext_ImageSummary_Tag(ctx, field)
|
|
case "Digest":
|
|
return ec.fieldContext_ImageSummary_Digest(ctx, field)
|
|
case "ConfigDigest":
|
|
return ec.fieldContext_ImageSummary_ConfigDigest(ctx, field)
|
|
case "LastUpdated":
|
|
return ec.fieldContext_ImageSummary_LastUpdated(ctx, field)
|
|
case "IsSigned":
|
|
return ec.fieldContext_ImageSummary_IsSigned(ctx, field)
|
|
case "Size":
|
|
return ec.fieldContext_ImageSummary_Size(ctx, field)
|
|
case "Platform":
|
|
return ec.fieldContext_ImageSummary_Platform(ctx, field)
|
|
case "Vendor":
|
|
return ec.fieldContext_ImageSummary_Vendor(ctx, field)
|
|
case "Score":
|
|
return ec.fieldContext_ImageSummary_Score(ctx, field)
|
|
case "DownloadCount":
|
|
return ec.fieldContext_ImageSummary_DownloadCount(ctx, field)
|
|
case "Layers":
|
|
return ec.fieldContext_ImageSummary_Layers(ctx, field)
|
|
case "Description":
|
|
return ec.fieldContext_ImageSummary_Description(ctx, field)
|
|
case "Licenses":
|
|
return ec.fieldContext_ImageSummary_Licenses(ctx, field)
|
|
case "Labels":
|
|
return ec.fieldContext_ImageSummary_Labels(ctx, field)
|
|
case "Title":
|
|
return ec.fieldContext_ImageSummary_Title(ctx, field)
|
|
case "Source":
|
|
return ec.fieldContext_ImageSummary_Source(ctx, field)
|
|
case "Documentation":
|
|
return ec.fieldContext_ImageSummary_Documentation(ctx, field)
|
|
case "History":
|
|
return ec.fieldContext_ImageSummary_History(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type ImageSummary", field.Name)
|
|
},
|
|
}
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
err = ec.Recover(ctx, r)
|
|
ec.Error(ctx, err)
|
|
}
|
|
}()
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
if fc.Args, err = ec.field_Query_ImageListWithCVEFixed_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
|
ec.Error(ctx, err)
|
|
return
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _Query_ImageListForDigest(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_Query_ImageListForDigest(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().ImageListForDigest(rctx, fc.Args["id"].(string))
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*ImageSummary)
|
|
fc.Result = res
|
|
return ec.marshalOImageSummary2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐImageSummaryᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_Query_ImageListForDigest(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "RepoName":
|
|
return ec.fieldContext_ImageSummary_RepoName(ctx, field)
|
|
case "Tag":
|
|
return ec.fieldContext_ImageSummary_Tag(ctx, field)
|
|
case "Digest":
|
|
return ec.fieldContext_ImageSummary_Digest(ctx, field)
|
|
case "ConfigDigest":
|
|
return ec.fieldContext_ImageSummary_ConfigDigest(ctx, field)
|
|
case "LastUpdated":
|
|
return ec.fieldContext_ImageSummary_LastUpdated(ctx, field)
|
|
case "IsSigned":
|
|
return ec.fieldContext_ImageSummary_IsSigned(ctx, field)
|
|
case "Size":
|
|
return ec.fieldContext_ImageSummary_Size(ctx, field)
|
|
case "Platform":
|
|
return ec.fieldContext_ImageSummary_Platform(ctx, field)
|
|
case "Vendor":
|
|
return ec.fieldContext_ImageSummary_Vendor(ctx, field)
|
|
case "Score":
|
|
return ec.fieldContext_ImageSummary_Score(ctx, field)
|
|
case "DownloadCount":
|
|
return ec.fieldContext_ImageSummary_DownloadCount(ctx, field)
|
|
case "Layers":
|
|
return ec.fieldContext_ImageSummary_Layers(ctx, field)
|
|
case "Description":
|
|
return ec.fieldContext_ImageSummary_Description(ctx, field)
|
|
case "Licenses":
|
|
return ec.fieldContext_ImageSummary_Licenses(ctx, field)
|
|
case "Labels":
|
|
return ec.fieldContext_ImageSummary_Labels(ctx, field)
|
|
case "Title":
|
|
return ec.fieldContext_ImageSummary_Title(ctx, field)
|
|
case "Source":
|
|
return ec.fieldContext_ImageSummary_Source(ctx, field)
|
|
case "Documentation":
|
|
return ec.fieldContext_ImageSummary_Documentation(ctx, field)
|
|
case "History":
|
|
return ec.fieldContext_ImageSummary_History(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type ImageSummary", field.Name)
|
|
},
|
|
}
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
err = ec.Recover(ctx, r)
|
|
ec.Error(ctx, err)
|
|
}
|
|
}()
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
if fc.Args, err = ec.field_Query_ImageListForDigest_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
|
ec.Error(ctx, err)
|
|
return
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _Query_RepoListWithNewestImage(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_Query_RepoListWithNewestImage(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().RepoListWithNewestImage(rctx)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*RepoSummary)
|
|
fc.Result = res
|
|
return ec.marshalNRepoSummary2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐRepoSummaryᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_Query_RepoListWithNewestImage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "Name":
|
|
return ec.fieldContext_RepoSummary_Name(ctx, field)
|
|
case "LastUpdated":
|
|
return ec.fieldContext_RepoSummary_LastUpdated(ctx, field)
|
|
case "Size":
|
|
return ec.fieldContext_RepoSummary_Size(ctx, field)
|
|
case "Platforms":
|
|
return ec.fieldContext_RepoSummary_Platforms(ctx, field)
|
|
case "Vendors":
|
|
return ec.fieldContext_RepoSummary_Vendors(ctx, field)
|
|
case "Score":
|
|
return ec.fieldContext_RepoSummary_Score(ctx, field)
|
|
case "NewestImage":
|
|
return ec.fieldContext_RepoSummary_NewestImage(ctx, field)
|
|
case "DownloadCount":
|
|
return ec.fieldContext_RepoSummary_DownloadCount(ctx, field)
|
|
case "StarCount":
|
|
return ec.fieldContext_RepoSummary_StarCount(ctx, field)
|
|
case "IsBookmarked":
|
|
return ec.fieldContext_RepoSummary_IsBookmarked(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type RepoSummary", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _Query_ImageList(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_Query_ImageList(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().ImageList(rctx, fc.Args["repo"].(string))
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*ImageSummary)
|
|
fc.Result = res
|
|
return ec.marshalOImageSummary2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐImageSummaryᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_Query_ImageList(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "RepoName":
|
|
return ec.fieldContext_ImageSummary_RepoName(ctx, field)
|
|
case "Tag":
|
|
return ec.fieldContext_ImageSummary_Tag(ctx, field)
|
|
case "Digest":
|
|
return ec.fieldContext_ImageSummary_Digest(ctx, field)
|
|
case "ConfigDigest":
|
|
return ec.fieldContext_ImageSummary_ConfigDigest(ctx, field)
|
|
case "LastUpdated":
|
|
return ec.fieldContext_ImageSummary_LastUpdated(ctx, field)
|
|
case "IsSigned":
|
|
return ec.fieldContext_ImageSummary_IsSigned(ctx, field)
|
|
case "Size":
|
|
return ec.fieldContext_ImageSummary_Size(ctx, field)
|
|
case "Platform":
|
|
return ec.fieldContext_ImageSummary_Platform(ctx, field)
|
|
case "Vendor":
|
|
return ec.fieldContext_ImageSummary_Vendor(ctx, field)
|
|
case "Score":
|
|
return ec.fieldContext_ImageSummary_Score(ctx, field)
|
|
case "DownloadCount":
|
|
return ec.fieldContext_ImageSummary_DownloadCount(ctx, field)
|
|
case "Layers":
|
|
return ec.fieldContext_ImageSummary_Layers(ctx, field)
|
|
case "Description":
|
|
return ec.fieldContext_ImageSummary_Description(ctx, field)
|
|
case "Licenses":
|
|
return ec.fieldContext_ImageSummary_Licenses(ctx, field)
|
|
case "Labels":
|
|
return ec.fieldContext_ImageSummary_Labels(ctx, field)
|
|
case "Title":
|
|
return ec.fieldContext_ImageSummary_Title(ctx, field)
|
|
case "Source":
|
|
return ec.fieldContext_ImageSummary_Source(ctx, field)
|
|
case "Documentation":
|
|
return ec.fieldContext_ImageSummary_Documentation(ctx, field)
|
|
case "History":
|
|
return ec.fieldContext_ImageSummary_History(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type ImageSummary", field.Name)
|
|
},
|
|
}
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
err = ec.Recover(ctx, r)
|
|
ec.Error(ctx, err)
|
|
}
|
|
}()
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
if fc.Args, err = ec.field_Query_ImageList_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
|
ec.Error(ctx, err)
|
|
return
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _Query_ExpandedRepoInfo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_Query_ExpandedRepoInfo(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().ExpandedRepoInfo(rctx, fc.Args["repo"].(string))
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*RepoInfo)
|
|
fc.Result = res
|
|
return ec.marshalNRepoInfo2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐRepoInfo(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_Query_ExpandedRepoInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "Images":
|
|
return ec.fieldContext_RepoInfo_Images(ctx, field)
|
|
case "Summary":
|
|
return ec.fieldContext_RepoInfo_Summary(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type RepoInfo", field.Name)
|
|
},
|
|
}
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
err = ec.Recover(ctx, r)
|
|
ec.Error(ctx, err)
|
|
}
|
|
}()
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
if fc.Args, err = ec.field_Query_ExpandedRepoInfo_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
|
ec.Error(ctx, err)
|
|
return
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _Query_GlobalSearch(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_Query_GlobalSearch(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().GlobalSearch(rctx, fc.Args["query"].(string))
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*GlobalSearchResult)
|
|
fc.Result = res
|
|
return ec.marshalNGlobalSearchResult2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐGlobalSearchResult(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_Query_GlobalSearch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "Images":
|
|
return ec.fieldContext_GlobalSearchResult_Images(ctx, field)
|
|
case "Repos":
|
|
return ec.fieldContext_GlobalSearchResult_Repos(ctx, field)
|
|
case "Layers":
|
|
return ec.fieldContext_GlobalSearchResult_Layers(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type GlobalSearchResult", field.Name)
|
|
},
|
|
}
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
err = ec.Recover(ctx, r)
|
|
ec.Error(ctx, err)
|
|
}
|
|
}()
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
if fc.Args, err = ec.field_Query_GlobalSearch_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
|
ec.Error(ctx, err)
|
|
return
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _Query_BaseImageList(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_Query_BaseImageList(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().BaseImageList(rctx, fc.Args["image"].(string))
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*ImageSummary)
|
|
fc.Result = res
|
|
return ec.marshalOImageSummary2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐImageSummaryᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_Query_BaseImageList(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "RepoName":
|
|
return ec.fieldContext_ImageSummary_RepoName(ctx, field)
|
|
case "Tag":
|
|
return ec.fieldContext_ImageSummary_Tag(ctx, field)
|
|
case "Digest":
|
|
return ec.fieldContext_ImageSummary_Digest(ctx, field)
|
|
case "ConfigDigest":
|
|
return ec.fieldContext_ImageSummary_ConfigDigest(ctx, field)
|
|
case "LastUpdated":
|
|
return ec.fieldContext_ImageSummary_LastUpdated(ctx, field)
|
|
case "IsSigned":
|
|
return ec.fieldContext_ImageSummary_IsSigned(ctx, field)
|
|
case "Size":
|
|
return ec.fieldContext_ImageSummary_Size(ctx, field)
|
|
case "Platform":
|
|
return ec.fieldContext_ImageSummary_Platform(ctx, field)
|
|
case "Vendor":
|
|
return ec.fieldContext_ImageSummary_Vendor(ctx, field)
|
|
case "Score":
|
|
return ec.fieldContext_ImageSummary_Score(ctx, field)
|
|
case "DownloadCount":
|
|
return ec.fieldContext_ImageSummary_DownloadCount(ctx, field)
|
|
case "Layers":
|
|
return ec.fieldContext_ImageSummary_Layers(ctx, field)
|
|
case "Description":
|
|
return ec.fieldContext_ImageSummary_Description(ctx, field)
|
|
case "Licenses":
|
|
return ec.fieldContext_ImageSummary_Licenses(ctx, field)
|
|
case "Labels":
|
|
return ec.fieldContext_ImageSummary_Labels(ctx, field)
|
|
case "Title":
|
|
return ec.fieldContext_ImageSummary_Title(ctx, field)
|
|
case "Source":
|
|
return ec.fieldContext_ImageSummary_Source(ctx, field)
|
|
case "Documentation":
|
|
return ec.fieldContext_ImageSummary_Documentation(ctx, field)
|
|
case "History":
|
|
return ec.fieldContext_ImageSummary_History(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type ImageSummary", field.Name)
|
|
},
|
|
}
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
err = ec.Recover(ctx, r)
|
|
ec.Error(ctx, err)
|
|
}
|
|
}()
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
if fc.Args, err = ec.field_Query_BaseImageList_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
|
ec.Error(ctx, err)
|
|
return
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_Query___type(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.introspectType(fc.Args["name"].(string))
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "kind":
|
|
return ec.fieldContext___Type_kind(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext___Type_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Type_description(ctx, field)
|
|
case "fields":
|
|
return ec.fieldContext___Type_fields(ctx, field)
|
|
case "interfaces":
|
|
return ec.fieldContext___Type_interfaces(ctx, field)
|
|
case "possibleTypes":
|
|
return ec.fieldContext___Type_possibleTypes(ctx, field)
|
|
case "enumValues":
|
|
return ec.fieldContext___Type_enumValues(ctx, field)
|
|
case "inputFields":
|
|
return ec.fieldContext___Type_inputFields(ctx, field)
|
|
case "ofType":
|
|
return ec.fieldContext___Type_ofType(ctx, field)
|
|
case "specifiedByURL":
|
|
return ec.fieldContext___Type_specifiedByURL(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
|
|
},
|
|
}
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
err = ec.Recover(ctx, r)
|
|
ec.Error(ctx, err)
|
|
}
|
|
}()
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
|
ec.Error(ctx, err)
|
|
return
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_Query___schema(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.introspectSchema()
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Schema)
|
|
fc.Result = res
|
|
return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "description":
|
|
return ec.fieldContext___Schema_description(ctx, field)
|
|
case "types":
|
|
return ec.fieldContext___Schema_types(ctx, field)
|
|
case "queryType":
|
|
return ec.fieldContext___Schema_queryType(ctx, field)
|
|
case "mutationType":
|
|
return ec.fieldContext___Schema_mutationType(ctx, field)
|
|
case "subscriptionType":
|
|
return ec.fieldContext___Schema_subscriptionType(ctx, field)
|
|
case "directives":
|
|
return ec.fieldContext___Schema_directives(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _RepoInfo_Images(ctx context.Context, field graphql.CollectedField, obj *RepoInfo) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_RepoInfo_Images(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Images, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*ImageSummary)
|
|
fc.Result = res
|
|
return ec.marshalOImageSummary2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐImageSummary(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_RepoInfo_Images(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "RepoInfo",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "RepoName":
|
|
return ec.fieldContext_ImageSummary_RepoName(ctx, field)
|
|
case "Tag":
|
|
return ec.fieldContext_ImageSummary_Tag(ctx, field)
|
|
case "Digest":
|
|
return ec.fieldContext_ImageSummary_Digest(ctx, field)
|
|
case "ConfigDigest":
|
|
return ec.fieldContext_ImageSummary_ConfigDigest(ctx, field)
|
|
case "LastUpdated":
|
|
return ec.fieldContext_ImageSummary_LastUpdated(ctx, field)
|
|
case "IsSigned":
|
|
return ec.fieldContext_ImageSummary_IsSigned(ctx, field)
|
|
case "Size":
|
|
return ec.fieldContext_ImageSummary_Size(ctx, field)
|
|
case "Platform":
|
|
return ec.fieldContext_ImageSummary_Platform(ctx, field)
|
|
case "Vendor":
|
|
return ec.fieldContext_ImageSummary_Vendor(ctx, field)
|
|
case "Score":
|
|
return ec.fieldContext_ImageSummary_Score(ctx, field)
|
|
case "DownloadCount":
|
|
return ec.fieldContext_ImageSummary_DownloadCount(ctx, field)
|
|
case "Layers":
|
|
return ec.fieldContext_ImageSummary_Layers(ctx, field)
|
|
case "Description":
|
|
return ec.fieldContext_ImageSummary_Description(ctx, field)
|
|
case "Licenses":
|
|
return ec.fieldContext_ImageSummary_Licenses(ctx, field)
|
|
case "Labels":
|
|
return ec.fieldContext_ImageSummary_Labels(ctx, field)
|
|
case "Title":
|
|
return ec.fieldContext_ImageSummary_Title(ctx, field)
|
|
case "Source":
|
|
return ec.fieldContext_ImageSummary_Source(ctx, field)
|
|
case "Documentation":
|
|
return ec.fieldContext_ImageSummary_Documentation(ctx, field)
|
|
case "History":
|
|
return ec.fieldContext_ImageSummary_History(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type ImageSummary", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _RepoInfo_Summary(ctx context.Context, field graphql.CollectedField, obj *RepoInfo) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_RepoInfo_Summary(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Summary, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*RepoSummary)
|
|
fc.Result = res
|
|
return ec.marshalORepoSummary2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐRepoSummary(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_RepoInfo_Summary(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "RepoInfo",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "Name":
|
|
return ec.fieldContext_RepoSummary_Name(ctx, field)
|
|
case "LastUpdated":
|
|
return ec.fieldContext_RepoSummary_LastUpdated(ctx, field)
|
|
case "Size":
|
|
return ec.fieldContext_RepoSummary_Size(ctx, field)
|
|
case "Platforms":
|
|
return ec.fieldContext_RepoSummary_Platforms(ctx, field)
|
|
case "Vendors":
|
|
return ec.fieldContext_RepoSummary_Vendors(ctx, field)
|
|
case "Score":
|
|
return ec.fieldContext_RepoSummary_Score(ctx, field)
|
|
case "NewestImage":
|
|
return ec.fieldContext_RepoSummary_NewestImage(ctx, field)
|
|
case "DownloadCount":
|
|
return ec.fieldContext_RepoSummary_DownloadCount(ctx, field)
|
|
case "StarCount":
|
|
return ec.fieldContext_RepoSummary_StarCount(ctx, field)
|
|
case "IsBookmarked":
|
|
return ec.fieldContext_RepoSummary_IsBookmarked(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type RepoSummary", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _RepoSummary_Name(ctx context.Context, field graphql.CollectedField, obj *RepoSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_RepoSummary_Name(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_RepoSummary_Name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "RepoSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _RepoSummary_LastUpdated(ctx context.Context, field graphql.CollectedField, obj *RepoSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_RepoSummary_LastUpdated(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.LastUpdated, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*time.Time)
|
|
fc.Result = res
|
|
return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_RepoSummary_LastUpdated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "RepoSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type Time does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _RepoSummary_Size(ctx context.Context, field graphql.CollectedField, obj *RepoSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_RepoSummary_Size(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Size, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_RepoSummary_Size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "RepoSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _RepoSummary_Platforms(ctx context.Context, field graphql.CollectedField, obj *RepoSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_RepoSummary_Platforms(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Platforms, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*OsArch)
|
|
fc.Result = res
|
|
return ec.marshalOOsArch2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐOsArch(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_RepoSummary_Platforms(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "RepoSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "Os":
|
|
return ec.fieldContext_OsArch_Os(ctx, field)
|
|
case "Arch":
|
|
return ec.fieldContext_OsArch_Arch(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type OsArch", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _RepoSummary_Vendors(ctx context.Context, field graphql.CollectedField, obj *RepoSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_RepoSummary_Vendors(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Vendors, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚕᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_RepoSummary_Vendors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "RepoSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _RepoSummary_Score(ctx context.Context, field graphql.CollectedField, obj *RepoSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_RepoSummary_Score(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Score, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*int)
|
|
fc.Result = res
|
|
return ec.marshalOInt2ᚖint(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_RepoSummary_Score(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "RepoSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type Int does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _RepoSummary_NewestImage(ctx context.Context, field graphql.CollectedField, obj *RepoSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_RepoSummary_NewestImage(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.NewestImage, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*ImageSummary)
|
|
fc.Result = res
|
|
return ec.marshalOImageSummary2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐImageSummary(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_RepoSummary_NewestImage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "RepoSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "RepoName":
|
|
return ec.fieldContext_ImageSummary_RepoName(ctx, field)
|
|
case "Tag":
|
|
return ec.fieldContext_ImageSummary_Tag(ctx, field)
|
|
case "Digest":
|
|
return ec.fieldContext_ImageSummary_Digest(ctx, field)
|
|
case "ConfigDigest":
|
|
return ec.fieldContext_ImageSummary_ConfigDigest(ctx, field)
|
|
case "LastUpdated":
|
|
return ec.fieldContext_ImageSummary_LastUpdated(ctx, field)
|
|
case "IsSigned":
|
|
return ec.fieldContext_ImageSummary_IsSigned(ctx, field)
|
|
case "Size":
|
|
return ec.fieldContext_ImageSummary_Size(ctx, field)
|
|
case "Platform":
|
|
return ec.fieldContext_ImageSummary_Platform(ctx, field)
|
|
case "Vendor":
|
|
return ec.fieldContext_ImageSummary_Vendor(ctx, field)
|
|
case "Score":
|
|
return ec.fieldContext_ImageSummary_Score(ctx, field)
|
|
case "DownloadCount":
|
|
return ec.fieldContext_ImageSummary_DownloadCount(ctx, field)
|
|
case "Layers":
|
|
return ec.fieldContext_ImageSummary_Layers(ctx, field)
|
|
case "Description":
|
|
return ec.fieldContext_ImageSummary_Description(ctx, field)
|
|
case "Licenses":
|
|
return ec.fieldContext_ImageSummary_Licenses(ctx, field)
|
|
case "Labels":
|
|
return ec.fieldContext_ImageSummary_Labels(ctx, field)
|
|
case "Title":
|
|
return ec.fieldContext_ImageSummary_Title(ctx, field)
|
|
case "Source":
|
|
return ec.fieldContext_ImageSummary_Source(ctx, field)
|
|
case "Documentation":
|
|
return ec.fieldContext_ImageSummary_Documentation(ctx, field)
|
|
case "History":
|
|
return ec.fieldContext_ImageSummary_History(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type ImageSummary", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _RepoSummary_DownloadCount(ctx context.Context, field graphql.CollectedField, obj *RepoSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_RepoSummary_DownloadCount(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.DownloadCount, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*int)
|
|
fc.Result = res
|
|
return ec.marshalOInt2ᚖint(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_RepoSummary_DownloadCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "RepoSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type Int does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _RepoSummary_StarCount(ctx context.Context, field graphql.CollectedField, obj *RepoSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_RepoSummary_StarCount(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.StarCount, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*int)
|
|
fc.Result = res
|
|
return ec.marshalOInt2ᚖint(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_RepoSummary_StarCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "RepoSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type Int does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _RepoSummary_IsBookmarked(ctx context.Context, field graphql.CollectedField, obj *RepoSummary) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_RepoSummary_IsBookmarked(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.IsBookmarked, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*bool)
|
|
fc.Result = res
|
|
return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_RepoSummary_IsBookmarked(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "RepoSummary",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type Boolean does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Directive_name(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Directive_description(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Directive_locations(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Locations, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]string)
|
|
fc.Result = res
|
|
return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type __DirectiveLocation does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Directive_args(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Args, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.InputValue)
|
|
fc.Result = res
|
|
return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "name":
|
|
return ec.fieldContext___InputValue_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___InputValue_description(ctx, field)
|
|
case "type":
|
|
return ec.fieldContext___InputValue_type(ctx, field)
|
|
case "defaultValue":
|
|
return ec.fieldContext___InputValue_defaultValue(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.IsRepeatable, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type Boolean does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___EnumValue_name(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__EnumValue",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___EnumValue_description(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__EnumValue",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.IsDeprecated(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__EnumValue",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type Boolean does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.DeprecationReason(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__EnumValue",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Field_name(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Field_description(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Field_args(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Args, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.InputValue)
|
|
fc.Result = res
|
|
return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "name":
|
|
return ec.fieldContext___InputValue_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___InputValue_description(ctx, field)
|
|
case "type":
|
|
return ec.fieldContext___InputValue_type(ctx, field)
|
|
case "defaultValue":
|
|
return ec.fieldContext___InputValue_defaultValue(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Field_type(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Type, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "kind":
|
|
return ec.fieldContext___Type_kind(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext___Type_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Type_description(ctx, field)
|
|
case "fields":
|
|
return ec.fieldContext___Type_fields(ctx, field)
|
|
case "interfaces":
|
|
return ec.fieldContext___Type_interfaces(ctx, field)
|
|
case "possibleTypes":
|
|
return ec.fieldContext___Type_possibleTypes(ctx, field)
|
|
case "enumValues":
|
|
return ec.fieldContext___Type_enumValues(ctx, field)
|
|
case "inputFields":
|
|
return ec.fieldContext___Type_inputFields(ctx, field)
|
|
case "ofType":
|
|
return ec.fieldContext___Type_ofType(ctx, field)
|
|
case "specifiedByURL":
|
|
return ec.fieldContext___Type_specifiedByURL(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Field_isDeprecated(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.IsDeprecated(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type Boolean does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Field_deprecationReason(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.DeprecationReason(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___InputValue_name(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__InputValue",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___InputValue_description(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__InputValue",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___InputValue_type(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Type, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__InputValue",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "kind":
|
|
return ec.fieldContext___Type_kind(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext___Type_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Type_description(ctx, field)
|
|
case "fields":
|
|
return ec.fieldContext___Type_fields(ctx, field)
|
|
case "interfaces":
|
|
return ec.fieldContext___Type_interfaces(ctx, field)
|
|
case "possibleTypes":
|
|
return ec.fieldContext___Type_possibleTypes(ctx, field)
|
|
case "enumValues":
|
|
return ec.fieldContext___Type_enumValues(ctx, field)
|
|
case "inputFields":
|
|
return ec.fieldContext___Type_inputFields(ctx, field)
|
|
case "ofType":
|
|
return ec.fieldContext___Type_ofType(ctx, field)
|
|
case "specifiedByURL":
|
|
return ec.fieldContext___Type_specifiedByURL(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.DefaultValue, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__InputValue",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Schema_description(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Schema_types(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Types(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "kind":
|
|
return ec.fieldContext___Type_kind(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext___Type_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Type_description(ctx, field)
|
|
case "fields":
|
|
return ec.fieldContext___Type_fields(ctx, field)
|
|
case "interfaces":
|
|
return ec.fieldContext___Type_interfaces(ctx, field)
|
|
case "possibleTypes":
|
|
return ec.fieldContext___Type_possibleTypes(ctx, field)
|
|
case "enumValues":
|
|
return ec.fieldContext___Type_enumValues(ctx, field)
|
|
case "inputFields":
|
|
return ec.fieldContext___Type_inputFields(ctx, field)
|
|
case "ofType":
|
|
return ec.fieldContext___Type_ofType(ctx, field)
|
|
case "specifiedByURL":
|
|
return ec.fieldContext___Type_specifiedByURL(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Schema_queryType(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.QueryType(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "kind":
|
|
return ec.fieldContext___Type_kind(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext___Type_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Type_description(ctx, field)
|
|
case "fields":
|
|
return ec.fieldContext___Type_fields(ctx, field)
|
|
case "interfaces":
|
|
return ec.fieldContext___Type_interfaces(ctx, field)
|
|
case "possibleTypes":
|
|
return ec.fieldContext___Type_possibleTypes(ctx, field)
|
|
case "enumValues":
|
|
return ec.fieldContext___Type_enumValues(ctx, field)
|
|
case "inputFields":
|
|
return ec.fieldContext___Type_inputFields(ctx, field)
|
|
case "ofType":
|
|
return ec.fieldContext___Type_ofType(ctx, field)
|
|
case "specifiedByURL":
|
|
return ec.fieldContext___Type_specifiedByURL(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Schema_mutationType(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.MutationType(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "kind":
|
|
return ec.fieldContext___Type_kind(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext___Type_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Type_description(ctx, field)
|
|
case "fields":
|
|
return ec.fieldContext___Type_fields(ctx, field)
|
|
case "interfaces":
|
|
return ec.fieldContext___Type_interfaces(ctx, field)
|
|
case "possibleTypes":
|
|
return ec.fieldContext___Type_possibleTypes(ctx, field)
|
|
case "enumValues":
|
|
return ec.fieldContext___Type_enumValues(ctx, field)
|
|
case "inputFields":
|
|
return ec.fieldContext___Type_inputFields(ctx, field)
|
|
case "ofType":
|
|
return ec.fieldContext___Type_ofType(ctx, field)
|
|
case "specifiedByURL":
|
|
return ec.fieldContext___Type_specifiedByURL(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.SubscriptionType(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "kind":
|
|
return ec.fieldContext___Type_kind(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext___Type_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Type_description(ctx, field)
|
|
case "fields":
|
|
return ec.fieldContext___Type_fields(ctx, field)
|
|
case "interfaces":
|
|
return ec.fieldContext___Type_interfaces(ctx, field)
|
|
case "possibleTypes":
|
|
return ec.fieldContext___Type_possibleTypes(ctx, field)
|
|
case "enumValues":
|
|
return ec.fieldContext___Type_enumValues(ctx, field)
|
|
case "inputFields":
|
|
return ec.fieldContext___Type_inputFields(ctx, field)
|
|
case "ofType":
|
|
return ec.fieldContext___Type_ofType(ctx, field)
|
|
case "specifiedByURL":
|
|
return ec.fieldContext___Type_specifiedByURL(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Schema_directives(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Directives(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Directive)
|
|
fc.Result = res
|
|
return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "name":
|
|
return ec.fieldContext___Directive_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Directive_description(ctx, field)
|
|
case "locations":
|
|
return ec.fieldContext___Directive_locations(ctx, field)
|
|
case "args":
|
|
return ec.fieldContext___Directive_args(ctx, field)
|
|
case "isRepeatable":
|
|
return ec.fieldContext___Directive_isRepeatable(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Type_kind(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Kind(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalN__TypeKind2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type __TypeKind does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Type_name(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Type_description(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Type_fields(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Field)
|
|
fc.Result = res
|
|
return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "name":
|
|
return ec.fieldContext___Field_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Field_description(ctx, field)
|
|
case "args":
|
|
return ec.fieldContext___Field_args(ctx, field)
|
|
case "type":
|
|
return ec.fieldContext___Field_type(ctx, field)
|
|
case "isDeprecated":
|
|
return ec.fieldContext___Field_isDeprecated(ctx, field)
|
|
case "deprecationReason":
|
|
return ec.fieldContext___Field_deprecationReason(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name)
|
|
},
|
|
}
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
err = ec.Recover(ctx, r)
|
|
ec.Error(ctx, err)
|
|
}
|
|
}()
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
if fc.Args, err = ec.field___Type_fields_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
|
ec.Error(ctx, err)
|
|
return
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Type_interfaces(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Interfaces(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "kind":
|
|
return ec.fieldContext___Type_kind(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext___Type_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Type_description(ctx, field)
|
|
case "fields":
|
|
return ec.fieldContext___Type_fields(ctx, field)
|
|
case "interfaces":
|
|
return ec.fieldContext___Type_interfaces(ctx, field)
|
|
case "possibleTypes":
|
|
return ec.fieldContext___Type_possibleTypes(ctx, field)
|
|
case "enumValues":
|
|
return ec.fieldContext___Type_enumValues(ctx, field)
|
|
case "inputFields":
|
|
return ec.fieldContext___Type_inputFields(ctx, field)
|
|
case "ofType":
|
|
return ec.fieldContext___Type_ofType(ctx, field)
|
|
case "specifiedByURL":
|
|
return ec.fieldContext___Type_specifiedByURL(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Type_possibleTypes(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.PossibleTypes(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "kind":
|
|
return ec.fieldContext___Type_kind(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext___Type_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Type_description(ctx, field)
|
|
case "fields":
|
|
return ec.fieldContext___Type_fields(ctx, field)
|
|
case "interfaces":
|
|
return ec.fieldContext___Type_interfaces(ctx, field)
|
|
case "possibleTypes":
|
|
return ec.fieldContext___Type_possibleTypes(ctx, field)
|
|
case "enumValues":
|
|
return ec.fieldContext___Type_enumValues(ctx, field)
|
|
case "inputFields":
|
|
return ec.fieldContext___Type_inputFields(ctx, field)
|
|
case "ofType":
|
|
return ec.fieldContext___Type_ofType(ctx, field)
|
|
case "specifiedByURL":
|
|
return ec.fieldContext___Type_specifiedByURL(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Type_enumValues(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.EnumValue)
|
|
fc.Result = res
|
|
return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "name":
|
|
return ec.fieldContext___EnumValue_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___EnumValue_description(ctx, field)
|
|
case "isDeprecated":
|
|
return ec.fieldContext___EnumValue_isDeprecated(ctx, field)
|
|
case "deprecationReason":
|
|
return ec.fieldContext___EnumValue_deprecationReason(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name)
|
|
},
|
|
}
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
err = ec.Recover(ctx, r)
|
|
ec.Error(ctx, err)
|
|
}
|
|
}()
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
if fc.Args, err = ec.field___Type_enumValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
|
ec.Error(ctx, err)
|
|
return
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Type_inputFields(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.InputFields(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.InputValue)
|
|
fc.Result = res
|
|
return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "name":
|
|
return ec.fieldContext___InputValue_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___InputValue_description(ctx, field)
|
|
case "type":
|
|
return ec.fieldContext___InputValue_type(ctx, field)
|
|
case "defaultValue":
|
|
return ec.fieldContext___InputValue_defaultValue(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Type_ofType(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.OfType(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "kind":
|
|
return ec.fieldContext___Type_kind(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext___Type_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Type_description(ctx, field)
|
|
case "fields":
|
|
return ec.fieldContext___Type_fields(ctx, field)
|
|
case "interfaces":
|
|
return ec.fieldContext___Type_interfaces(ctx, field)
|
|
case "possibleTypes":
|
|
return ec.fieldContext___Type_possibleTypes(ctx, field)
|
|
case "enumValues":
|
|
return ec.fieldContext___Type_enumValues(ctx, field)
|
|
case "inputFields":
|
|
return ec.fieldContext___Type_inputFields(ctx, field)
|
|
case "ofType":
|
|
return ec.fieldContext___Type_ofType(ctx, field)
|
|
case "specifiedByURL":
|
|
return ec.fieldContext___Type_specifiedByURL(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.SpecifiedByURL(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
// endregion **************************** field.gotpl *****************************
|
|
|
|
// region **************************** input.gotpl *****************************
|
|
|
|
// endregion **************************** input.gotpl *****************************
|
|
|
|
// region ************************** interface.gotpl ***************************
|
|
|
|
// endregion ************************** interface.gotpl ***************************
|
|
|
|
// region **************************** object.gotpl ****************************
|
|
|
|
var cVEImplementors = []string{"CVE"}
|
|
|
|
func (ec *executionContext) _CVE(ctx context.Context, sel ast.SelectionSet, obj *Cve) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, cVEImplementors)
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("CVE")
|
|
case "Id":
|
|
|
|
out.Values[i] = ec._CVE_Id(ctx, field, obj)
|
|
|
|
case "Title":
|
|
|
|
out.Values[i] = ec._CVE_Title(ctx, field, obj)
|
|
|
|
case "Description":
|
|
|
|
out.Values[i] = ec._CVE_Description(ctx, field, obj)
|
|
|
|
case "Severity":
|
|
|
|
out.Values[i] = ec._CVE_Severity(ctx, field, obj)
|
|
|
|
case "PackageList":
|
|
|
|
out.Values[i] = ec._CVE_PackageList(ctx, field, obj)
|
|
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var cVEResultForImageImplementors = []string{"CVEResultForImage"}
|
|
|
|
func (ec *executionContext) _CVEResultForImage(ctx context.Context, sel ast.SelectionSet, obj *CVEResultForImage) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, cVEResultForImageImplementors)
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("CVEResultForImage")
|
|
case "Tag":
|
|
|
|
out.Values[i] = ec._CVEResultForImage_Tag(ctx, field, obj)
|
|
|
|
case "CVEList":
|
|
|
|
out.Values[i] = ec._CVEResultForImage_CVEList(ctx, field, obj)
|
|
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var globalSearchResultImplementors = []string{"GlobalSearchResult"}
|
|
|
|
func (ec *executionContext) _GlobalSearchResult(ctx context.Context, sel ast.SelectionSet, obj *GlobalSearchResult) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, globalSearchResultImplementors)
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("GlobalSearchResult")
|
|
case "Images":
|
|
|
|
out.Values[i] = ec._GlobalSearchResult_Images(ctx, field, obj)
|
|
|
|
case "Repos":
|
|
|
|
out.Values[i] = ec._GlobalSearchResult_Repos(ctx, field, obj)
|
|
|
|
case "Layers":
|
|
|
|
out.Values[i] = ec._GlobalSearchResult_Layers(ctx, field, obj)
|
|
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var historyDescriptionImplementors = []string{"HistoryDescription"}
|
|
|
|
func (ec *executionContext) _HistoryDescription(ctx context.Context, sel ast.SelectionSet, obj *HistoryDescription) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, historyDescriptionImplementors)
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("HistoryDescription")
|
|
case "Created":
|
|
|
|
out.Values[i] = ec._HistoryDescription_Created(ctx, field, obj)
|
|
|
|
case "CreatedBy":
|
|
|
|
out.Values[i] = ec._HistoryDescription_CreatedBy(ctx, field, obj)
|
|
|
|
case "Author":
|
|
|
|
out.Values[i] = ec._HistoryDescription_Author(ctx, field, obj)
|
|
|
|
case "Comment":
|
|
|
|
out.Values[i] = ec._HistoryDescription_Comment(ctx, field, obj)
|
|
|
|
case "EmptyLayer":
|
|
|
|
out.Values[i] = ec._HistoryDescription_EmptyLayer(ctx, field, obj)
|
|
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var imageSummaryImplementors = []string{"ImageSummary"}
|
|
|
|
func (ec *executionContext) _ImageSummary(ctx context.Context, sel ast.SelectionSet, obj *ImageSummary) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, imageSummaryImplementors)
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("ImageSummary")
|
|
case "RepoName":
|
|
|
|
out.Values[i] = ec._ImageSummary_RepoName(ctx, field, obj)
|
|
|
|
case "Tag":
|
|
|
|
out.Values[i] = ec._ImageSummary_Tag(ctx, field, obj)
|
|
|
|
case "Digest":
|
|
|
|
out.Values[i] = ec._ImageSummary_Digest(ctx, field, obj)
|
|
|
|
case "ConfigDigest":
|
|
|
|
out.Values[i] = ec._ImageSummary_ConfigDigest(ctx, field, obj)
|
|
|
|
case "LastUpdated":
|
|
|
|
out.Values[i] = ec._ImageSummary_LastUpdated(ctx, field, obj)
|
|
|
|
case "IsSigned":
|
|
|
|
out.Values[i] = ec._ImageSummary_IsSigned(ctx, field, obj)
|
|
|
|
case "Size":
|
|
|
|
out.Values[i] = ec._ImageSummary_Size(ctx, field, obj)
|
|
|
|
case "Platform":
|
|
|
|
out.Values[i] = ec._ImageSummary_Platform(ctx, field, obj)
|
|
|
|
case "Vendor":
|
|
|
|
out.Values[i] = ec._ImageSummary_Vendor(ctx, field, obj)
|
|
|
|
case "Score":
|
|
|
|
out.Values[i] = ec._ImageSummary_Score(ctx, field, obj)
|
|
|
|
case "DownloadCount":
|
|
|
|
out.Values[i] = ec._ImageSummary_DownloadCount(ctx, field, obj)
|
|
|
|
case "Layers":
|
|
|
|
out.Values[i] = ec._ImageSummary_Layers(ctx, field, obj)
|
|
|
|
case "Description":
|
|
|
|
out.Values[i] = ec._ImageSummary_Description(ctx, field, obj)
|
|
|
|
case "Licenses":
|
|
|
|
out.Values[i] = ec._ImageSummary_Licenses(ctx, field, obj)
|
|
|
|
case "Labels":
|
|
|
|
out.Values[i] = ec._ImageSummary_Labels(ctx, field, obj)
|
|
|
|
case "Title":
|
|
|
|
out.Values[i] = ec._ImageSummary_Title(ctx, field, obj)
|
|
|
|
case "Source":
|
|
|
|
out.Values[i] = ec._ImageSummary_Source(ctx, field, obj)
|
|
|
|
case "Documentation":
|
|
|
|
out.Values[i] = ec._ImageSummary_Documentation(ctx, field, obj)
|
|
|
|
case "History":
|
|
|
|
out.Values[i] = ec._ImageSummary_History(ctx, field, obj)
|
|
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var layerHistoryImplementors = []string{"LayerHistory"}
|
|
|
|
func (ec *executionContext) _LayerHistory(ctx context.Context, sel ast.SelectionSet, obj *LayerHistory) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, layerHistoryImplementors)
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("LayerHistory")
|
|
case "Layer":
|
|
|
|
out.Values[i] = ec._LayerHistory_Layer(ctx, field, obj)
|
|
|
|
case "HistoryDescription":
|
|
|
|
out.Values[i] = ec._LayerHistory_HistoryDescription(ctx, field, obj)
|
|
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var layerSummaryImplementors = []string{"LayerSummary"}
|
|
|
|
func (ec *executionContext) _LayerSummary(ctx context.Context, sel ast.SelectionSet, obj *LayerSummary) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, layerSummaryImplementors)
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("LayerSummary")
|
|
case "Size":
|
|
|
|
out.Values[i] = ec._LayerSummary_Size(ctx, field, obj)
|
|
|
|
case "Digest":
|
|
|
|
out.Values[i] = ec._LayerSummary_Digest(ctx, field, obj)
|
|
|
|
case "Score":
|
|
|
|
out.Values[i] = ec._LayerSummary_Score(ctx, field, obj)
|
|
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var osArchImplementors = []string{"OsArch"}
|
|
|
|
func (ec *executionContext) _OsArch(ctx context.Context, sel ast.SelectionSet, obj *OsArch) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, osArchImplementors)
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("OsArch")
|
|
case "Os":
|
|
|
|
out.Values[i] = ec._OsArch_Os(ctx, field, obj)
|
|
|
|
case "Arch":
|
|
|
|
out.Values[i] = ec._OsArch_Arch(ctx, field, obj)
|
|
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var packageInfoImplementors = []string{"PackageInfo"}
|
|
|
|
func (ec *executionContext) _PackageInfo(ctx context.Context, sel ast.SelectionSet, obj *PackageInfo) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, packageInfoImplementors)
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("PackageInfo")
|
|
case "Name":
|
|
|
|
out.Values[i] = ec._PackageInfo_Name(ctx, field, obj)
|
|
|
|
case "InstalledVersion":
|
|
|
|
out.Values[i] = ec._PackageInfo_InstalledVersion(ctx, field, obj)
|
|
|
|
case "FixedVersion":
|
|
|
|
out.Values[i] = ec._PackageInfo_FixedVersion(ctx, field, obj)
|
|
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var queryImplementors = []string{"Query"}
|
|
|
|
func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
|
|
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
|
|
Object: "Query",
|
|
})
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{
|
|
Object: field.Name,
|
|
Field: field,
|
|
})
|
|
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Query")
|
|
case "CVEListForImage":
|
|
field := field
|
|
|
|
innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_CVEListForImage(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
}
|
|
|
|
rrm := func(ctx context.Context) graphql.Marshaler {
|
|
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
|
}
|
|
|
|
out.Concurrently(i, func() graphql.Marshaler {
|
|
return rrm(innerCtx)
|
|
})
|
|
case "ImageListForCVE":
|
|
field := field
|
|
|
|
innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_ImageListForCVE(ctx, field)
|
|
return res
|
|
}
|
|
|
|
rrm := func(ctx context.Context) graphql.Marshaler {
|
|
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
|
}
|
|
|
|
out.Concurrently(i, func() graphql.Marshaler {
|
|
return rrm(innerCtx)
|
|
})
|
|
case "ImageListWithCVEFixed":
|
|
field := field
|
|
|
|
innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_ImageListWithCVEFixed(ctx, field)
|
|
return res
|
|
}
|
|
|
|
rrm := func(ctx context.Context) graphql.Marshaler {
|
|
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
|
}
|
|
|
|
out.Concurrently(i, func() graphql.Marshaler {
|
|
return rrm(innerCtx)
|
|
})
|
|
case "ImageListForDigest":
|
|
field := field
|
|
|
|
innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_ImageListForDigest(ctx, field)
|
|
return res
|
|
}
|
|
|
|
rrm := func(ctx context.Context) graphql.Marshaler {
|
|
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
|
}
|
|
|
|
out.Concurrently(i, func() graphql.Marshaler {
|
|
return rrm(innerCtx)
|
|
})
|
|
case "RepoListWithNewestImage":
|
|
field := field
|
|
|
|
innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_RepoListWithNewestImage(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
}
|
|
|
|
rrm := func(ctx context.Context) graphql.Marshaler {
|
|
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
|
}
|
|
|
|
out.Concurrently(i, func() graphql.Marshaler {
|
|
return rrm(innerCtx)
|
|
})
|
|
case "ImageList":
|
|
field := field
|
|
|
|
innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_ImageList(ctx, field)
|
|
return res
|
|
}
|
|
|
|
rrm := func(ctx context.Context) graphql.Marshaler {
|
|
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
|
}
|
|
|
|
out.Concurrently(i, func() graphql.Marshaler {
|
|
return rrm(innerCtx)
|
|
})
|
|
case "ExpandedRepoInfo":
|
|
field := field
|
|
|
|
innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_ExpandedRepoInfo(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
}
|
|
|
|
rrm := func(ctx context.Context) graphql.Marshaler {
|
|
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
|
}
|
|
|
|
out.Concurrently(i, func() graphql.Marshaler {
|
|
return rrm(innerCtx)
|
|
})
|
|
case "GlobalSearch":
|
|
field := field
|
|
|
|
innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_GlobalSearch(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
}
|
|
|
|
rrm := func(ctx context.Context) graphql.Marshaler {
|
|
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
|
}
|
|
|
|
out.Concurrently(i, func() graphql.Marshaler {
|
|
return rrm(innerCtx)
|
|
})
|
|
case "BaseImageList":
|
|
field := field
|
|
|
|
innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_BaseImageList(ctx, field)
|
|
return res
|
|
}
|
|
|
|
rrm := func(ctx context.Context) graphql.Marshaler {
|
|
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
|
}
|
|
|
|
out.Concurrently(i, func() graphql.Marshaler {
|
|
return rrm(innerCtx)
|
|
})
|
|
case "__type":
|
|
|
|
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
|
|
return ec._Query___type(ctx, field)
|
|
})
|
|
|
|
case "__schema":
|
|
|
|
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
|
|
return ec._Query___schema(ctx, field)
|
|
})
|
|
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var repoInfoImplementors = []string{"RepoInfo"}
|
|
|
|
func (ec *executionContext) _RepoInfo(ctx context.Context, sel ast.SelectionSet, obj *RepoInfo) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, repoInfoImplementors)
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("RepoInfo")
|
|
case "Images":
|
|
|
|
out.Values[i] = ec._RepoInfo_Images(ctx, field, obj)
|
|
|
|
case "Summary":
|
|
|
|
out.Values[i] = ec._RepoInfo_Summary(ctx, field, obj)
|
|
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var repoSummaryImplementors = []string{"RepoSummary"}
|
|
|
|
func (ec *executionContext) _RepoSummary(ctx context.Context, sel ast.SelectionSet, obj *RepoSummary) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, repoSummaryImplementors)
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("RepoSummary")
|
|
case "Name":
|
|
|
|
out.Values[i] = ec._RepoSummary_Name(ctx, field, obj)
|
|
|
|
case "LastUpdated":
|
|
|
|
out.Values[i] = ec._RepoSummary_LastUpdated(ctx, field, obj)
|
|
|
|
case "Size":
|
|
|
|
out.Values[i] = ec._RepoSummary_Size(ctx, field, obj)
|
|
|
|
case "Platforms":
|
|
|
|
out.Values[i] = ec._RepoSummary_Platforms(ctx, field, obj)
|
|
|
|
case "Vendors":
|
|
|
|
out.Values[i] = ec._RepoSummary_Vendors(ctx, field, obj)
|
|
|
|
case "Score":
|
|
|
|
out.Values[i] = ec._RepoSummary_Score(ctx, field, obj)
|
|
|
|
case "NewestImage":
|
|
|
|
out.Values[i] = ec._RepoSummary_NewestImage(ctx, field, obj)
|
|
|
|
case "DownloadCount":
|
|
|
|
out.Values[i] = ec._RepoSummary_DownloadCount(ctx, field, obj)
|
|
|
|
case "StarCount":
|
|
|
|
out.Values[i] = ec._RepoSummary_StarCount(ctx, field, obj)
|
|
|
|
case "IsBookmarked":
|
|
|
|
out.Values[i] = ec._RepoSummary_IsBookmarked(ctx, field, obj)
|
|
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __DirectiveImplementors = []string{"__Directive"}
|
|
|
|
func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors)
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__Directive")
|
|
case "name":
|
|
|
|
out.Values[i] = ec.___Directive_name(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "description":
|
|
|
|
out.Values[i] = ec.___Directive_description(ctx, field, obj)
|
|
|
|
case "locations":
|
|
|
|
out.Values[i] = ec.___Directive_locations(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "args":
|
|
|
|
out.Values[i] = ec.___Directive_args(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "isRepeatable":
|
|
|
|
out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __EnumValueImplementors = []string{"__EnumValue"}
|
|
|
|
func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors)
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__EnumValue")
|
|
case "name":
|
|
|
|
out.Values[i] = ec.___EnumValue_name(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "description":
|
|
|
|
out.Values[i] = ec.___EnumValue_description(ctx, field, obj)
|
|
|
|
case "isDeprecated":
|
|
|
|
out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "deprecationReason":
|
|
|
|
out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj)
|
|
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __FieldImplementors = []string{"__Field"}
|
|
|
|
func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors)
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__Field")
|
|
case "name":
|
|
|
|
out.Values[i] = ec.___Field_name(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "description":
|
|
|
|
out.Values[i] = ec.___Field_description(ctx, field, obj)
|
|
|
|
case "args":
|
|
|
|
out.Values[i] = ec.___Field_args(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "type":
|
|
|
|
out.Values[i] = ec.___Field_type(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "isDeprecated":
|
|
|
|
out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "deprecationReason":
|
|
|
|
out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj)
|
|
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __InputValueImplementors = []string{"__InputValue"}
|
|
|
|
func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors)
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__InputValue")
|
|
case "name":
|
|
|
|
out.Values[i] = ec.___InputValue_name(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "description":
|
|
|
|
out.Values[i] = ec.___InputValue_description(ctx, field, obj)
|
|
|
|
case "type":
|
|
|
|
out.Values[i] = ec.___InputValue_type(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "defaultValue":
|
|
|
|
out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj)
|
|
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __SchemaImplementors = []string{"__Schema"}
|
|
|
|
func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors)
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__Schema")
|
|
case "description":
|
|
|
|
out.Values[i] = ec.___Schema_description(ctx, field, obj)
|
|
|
|
case "types":
|
|
|
|
out.Values[i] = ec.___Schema_types(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "queryType":
|
|
|
|
out.Values[i] = ec.___Schema_queryType(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "mutationType":
|
|
|
|
out.Values[i] = ec.___Schema_mutationType(ctx, field, obj)
|
|
|
|
case "subscriptionType":
|
|
|
|
out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj)
|
|
|
|
case "directives":
|
|
|
|
out.Values[i] = ec.___Schema_directives(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __TypeImplementors = []string{"__Type"}
|
|
|
|
func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors)
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__Type")
|
|
case "kind":
|
|
|
|
out.Values[i] = ec.___Type_kind(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "name":
|
|
|
|
out.Values[i] = ec.___Type_name(ctx, field, obj)
|
|
|
|
case "description":
|
|
|
|
out.Values[i] = ec.___Type_description(ctx, field, obj)
|
|
|
|
case "fields":
|
|
|
|
out.Values[i] = ec.___Type_fields(ctx, field, obj)
|
|
|
|
case "interfaces":
|
|
|
|
out.Values[i] = ec.___Type_interfaces(ctx, field, obj)
|
|
|
|
case "possibleTypes":
|
|
|
|
out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj)
|
|
|
|
case "enumValues":
|
|
|
|
out.Values[i] = ec.___Type_enumValues(ctx, field, obj)
|
|
|
|
case "inputFields":
|
|
|
|
out.Values[i] = ec.___Type_inputFields(ctx, field, obj)
|
|
|
|
case "ofType":
|
|
|
|
out.Values[i] = ec.___Type_ofType(ctx, field, obj)
|
|
|
|
case "specifiedByURL":
|
|
|
|
out.Values[i] = ec.___Type_specifiedByURL(ctx, field, obj)
|
|
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
// endregion **************************** object.gotpl ****************************
|
|
|
|
// region ***************************** type.gotpl *****************************
|
|
|
|
func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
|
|
res, err := graphql.UnmarshalBoolean(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
|
|
res := graphql.MarshalBoolean(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) marshalNCVEResultForImage2zotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐCVEResultForImage(ctx context.Context, sel ast.SelectionSet, v CVEResultForImage) graphql.Marshaler {
|
|
return ec._CVEResultForImage(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNCVEResultForImage2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐCVEResultForImage(ctx context.Context, sel ast.SelectionSet, v *CVEResultForImage) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._CVEResultForImage(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNGlobalSearchResult2zotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐGlobalSearchResult(ctx context.Context, sel ast.SelectionSet, v GlobalSearchResult) graphql.Marshaler {
|
|
return ec._GlobalSearchResult(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNGlobalSearchResult2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐGlobalSearchResult(ctx context.Context, sel ast.SelectionSet, v *GlobalSearchResult) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._GlobalSearchResult(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNImageSummary2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐImageSummary(ctx context.Context, sel ast.SelectionSet, v *ImageSummary) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._ImageSummary(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNRepoInfo2zotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐRepoInfo(ctx context.Context, sel ast.SelectionSet, v RepoInfo) graphql.Marshaler {
|
|
return ec._RepoInfo(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNRepoInfo2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐRepoInfo(ctx context.Context, sel ast.SelectionSet, v *RepoInfo) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._RepoInfo(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNRepoSummary2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐRepoSummaryᚄ(ctx context.Context, sel ast.SelectionSet, v []*RepoSummary) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalNRepoSummary2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐRepoSummary(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalNRepoSummary2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐRepoSummary(ctx context.Context, sel ast.SelectionSet, v *RepoSummary) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._RepoSummary(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalString(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
res := graphql.MarshalString(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler {
|
|
return ec.___Directive(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalString(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
res := graphql.MarshalString(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
|
|
var vSlice []interface{}
|
|
if v != nil {
|
|
vSlice = graphql.CoerceList(v)
|
|
}
|
|
var err error
|
|
res := make([]string, len(vSlice))
|
|
for i := range vSlice {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
|
res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler {
|
|
return ec.___EnumValue(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler {
|
|
return ec.___Field(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler {
|
|
return ec.___InputValue(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler {
|
|
return ec.___Type(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec.___Type(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalString(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
res := graphql.MarshalString(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
|
|
res, err := graphql.UnmarshalBoolean(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
|
|
res := graphql.MarshalBoolean(v)
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := graphql.UnmarshalBoolean(v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
res := graphql.MarshalBoolean(*v)
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) marshalOCVE2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐCve(ctx context.Context, sel ast.SelectionSet, v []*Cve) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalOCVE2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐCve(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalOCVE2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐCve(ctx context.Context, sel ast.SelectionSet, v *Cve) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._CVE(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOHistoryDescription2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐHistoryDescription(ctx context.Context, sel ast.SelectionSet, v *HistoryDescription) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._HistoryDescription(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOImageSummary2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐImageSummary(ctx context.Context, sel ast.SelectionSet, v []*ImageSummary) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalOImageSummary2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐImageSummary(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalOImageSummary2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐImageSummaryᚄ(ctx context.Context, sel ast.SelectionSet, v []*ImageSummary) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalNImageSummary2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐImageSummary(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalOImageSummary2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐImageSummary(ctx context.Context, sel ast.SelectionSet, v *ImageSummary) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._ImageSummary(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOInt2ᚖint(ctx context.Context, v interface{}) (*int, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := graphql.UnmarshalInt(v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOInt2ᚖint(ctx context.Context, sel ast.SelectionSet, v *int) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
res := graphql.MarshalInt(*v)
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) marshalOLayerHistory2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐLayerHistory(ctx context.Context, sel ast.SelectionSet, v []*LayerHistory) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalOLayerHistory2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐLayerHistory(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalOLayerHistory2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐLayerHistory(ctx context.Context, sel ast.SelectionSet, v *LayerHistory) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._LayerHistory(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOLayerSummary2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐLayerSummary(ctx context.Context, sel ast.SelectionSet, v []*LayerSummary) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalOLayerSummary2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐLayerSummary(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalOLayerSummary2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐLayerSummary(ctx context.Context, sel ast.SelectionSet, v *LayerSummary) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._LayerSummary(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOOsArch2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐOsArch(ctx context.Context, sel ast.SelectionSet, v []*OsArch) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalOOsArch2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐOsArch(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalOOsArch2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐOsArch(ctx context.Context, sel ast.SelectionSet, v *OsArch) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._OsArch(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOPackageInfo2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐPackageInfo(ctx context.Context, sel ast.SelectionSet, v []*PackageInfo) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalOPackageInfo2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐPackageInfo(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalOPackageInfo2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐPackageInfo(ctx context.Context, sel ast.SelectionSet, v *PackageInfo) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._PackageInfo(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalORepoSummary2ᚕᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐRepoSummary(ctx context.Context, sel ast.SelectionSet, v []*RepoSummary) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalORepoSummary2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐRepoSummary(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalORepoSummary2ᚖzotregistryᚗioᚋzotᚋpkgᚋextensionsᚋsearchᚋgql_generatedᚐRepoSummary(ctx context.Context, sel ast.SelectionSet, v *RepoSummary) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._RepoSummary(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOString2ᚕᚖstring(ctx context.Context, v interface{}) ([]*string, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
var vSlice []interface{}
|
|
if v != nil {
|
|
vSlice = graphql.CoerceList(v)
|
|
}
|
|
var err error
|
|
res := make([]*string, len(vSlice))
|
|
for i := range vSlice {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
|
res[i], err = ec.unmarshalOString2ᚖstring(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalOString2ᚕᚖstring(ctx context.Context, sel ast.SelectionSet, v []*string) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
for i := range v {
|
|
ret[i] = ec.marshalOString2ᚖstring(ctx, sel, v[i])
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := graphql.UnmarshalString(v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
res := graphql.MarshalString(*v)
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOTime2ᚖtimeᚐTime(ctx context.Context, v interface{}) (*time.Time, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := graphql.UnmarshalTime(v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOTime2ᚖtimeᚐTime(ctx context.Context, sel ast.SelectionSet, v *time.Time) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
res := graphql.MarshalTime(*v)
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec.___Schema(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec.___Type(ctx, sel, v)
|
|
}
|
|
|
|
// endregion ***************************** type.gotpl *****************************
|