gql_generated

package
v1.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type Annotation added in v1.4.3

type Annotation struct {
	Key   *string `json:"Key"`
	Value *string `json:"Value"`
}

type CVEResultForImage

type CVEResultForImage struct {
	Tag     *string `json:"Tag"`
	CVEList []*Cve  `json:"CVEList"`
}

Contains the tag of the image and a list of CVEs

type ComplexityRoot

type ComplexityRoot struct {
	Annotation struct {
		Key   func(childComplexity int) int
		Value func(childComplexity int) int
	}

	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 {
		Authors         func(childComplexity int) int
		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
		Vulnerabilities func(childComplexity int) int
	}

	ImageVulnerabilitySummary struct {
		Count       func(childComplexity int) int
		MaxSeverity 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
		DerivedImageList        func(childComplexity int, image string) int
		ExpandedRepoInfo        func(childComplexity int, repo string) int
		GlobalSearch            func(childComplexity int, query string) int
		Image                   func(childComplexity int, image 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
		Referrers               func(childComplexity int, repo string, digest string, typeArg string) int
		RepoListWithNewestImage func(childComplexity int) int
	}

	Referrer struct {
		Annotations  func(childComplexity int) int
		ArtifactType func(childComplexity int) int
		Digest       func(childComplexity int) int
		MediaType    func(childComplexity int) int
		Size         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 Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type Cve

type Cve struct {
	ID          *string        `json:"Id"`
	Title       *string        `json:"Title"`
	Description *string        `json:"Description"`
	Severity    *string        `json:"Severity"`
	PackageList []*PackageInfo `json:"PackageList"`
}

Contains various details about the CVE and a list of PackageInfo about the affected packages

type DirectiveRoot

type DirectiveRoot struct {
}

type GlobalSearchResult

type GlobalSearchResult struct {
	Images []*ImageSummary `json:"Images"`
	Repos  []*RepoSummary  `json:"Repos"`
	Layers []*LayerSummary `json:"Layers"`
}

Search everything. Can search Images, Repos and Layers

type HistoryDescription added in v1.4.3

type HistoryDescription struct {
	Created *time.Time `json:"Created"`
	// CreatedBy is the command which created the layer.
	CreatedBy *string `json:"CreatedBy"`
	// Author is the author of the build point.
	Author *string `json:"Author"`
	// Comment is a custom message set when creating the layer.
	Comment *string `json:"Comment"`
	// EmptyLayer is used to mark if the history item created a filesystem diff.
	EmptyLayer *bool `json:"EmptyLayer"`
}

type ImageSummary

type ImageSummary struct {
	RepoName        *string                    `json:"RepoName"`
	Tag             *string                    `json:"Tag"`
	Digest          *string                    `json:"Digest"`
	ConfigDigest    *string                    `json:"ConfigDigest"`
	LastUpdated     *time.Time                 `json:"LastUpdated"`
	IsSigned        *bool                      `json:"IsSigned"`
	Size            *string                    `json:"Size"`
	Platform        *OsArch                    `json:"Platform"`
	Vendor          *string                    `json:"Vendor"`
	Score           *int                       `json:"Score"`
	DownloadCount   *int                       `json:"DownloadCount"`
	Layers          []*LayerSummary            `json:"Layers"`
	Description     *string                    `json:"Description"`
	Licenses        *string                    `json:"Licenses"`
	Labels          *string                    `json:"Labels"`
	Title           *string                    `json:"Title"`
	Source          *string                    `json:"Source"`
	Documentation   *string                    `json:"Documentation"`
	History         []*LayerHistory            `json:"History"`
	Vulnerabilities *ImageVulnerabilitySummary `json:"Vulnerabilities"`
	Authors         *string                    `json:"Authors"`
}

Contains details about the image

type ImageVulnerabilitySummary added in v1.4.3

type ImageVulnerabilitySummary struct {
	MaxSeverity *string `json:"MaxSeverity"`
	Count       *int    `json:"Count"`
}

type LayerHistory added in v1.4.3

type LayerHistory struct {
	Layer              *LayerSummary       `json:"Layer"`
	HistoryDescription *HistoryDescription `json:"HistoryDescription"`
}

type LayerSummary

type LayerSummary struct {
	Size   *string `json:"Size"`
	Digest *string `json:"Digest"`
	Score  *int    `json:"Score"`
}

Contains details about the layer

type OsArch

type OsArch struct {
	Os   *string `json:"Os"`
	Arch *string `json:"Arch"`
}

Contains details about the supported OS and architecture of the image

type PackageInfo

type PackageInfo struct {
	Name             *string `json:"Name"`
	InstalledVersion *string `json:"InstalledVersion"`
	FixedVersion     *string `json:"FixedVersion"`
}

Contains the name of the package, the current installed version and the version where the CVE was fixed

type QueryResolver

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)
	DerivedImageList(ctx context.Context, image string) ([]*ImageSummary, error)
	BaseImageList(ctx context.Context, image string) ([]*ImageSummary, error)
	Image(ctx context.Context, image string) (*ImageSummary, error)
	Referrers(ctx context.Context, repo string, digest string, typeArg string) ([]*Referrer, error)
}

type Referrer added in v1.4.3

type Referrer struct {
	MediaType    *string       `json:"MediaType"`
	ArtifactType *string       `json:"ArtifactType"`
	Size         *int          `json:"Size"`
	Digest       *string       `json:"Digest"`
	Annotations  []*Annotation `json:"Annotations"`
}

type RepoInfo

type RepoInfo struct {
	Images  []*ImageSummary `json:"Images"`
	Summary *RepoSummary    `json:"Summary"`
}

Contains details about the repo: a list of image summaries and a summary of the repo

type RepoSummary

type RepoSummary struct {
	Name          *string       `json:"Name"`
	LastUpdated   *time.Time    `json:"LastUpdated"`
	Size          *string       `json:"Size"`
	Platforms     []*OsArch     `json:"Platforms"`
	Vendors       []*string     `json:"Vendors"`
	Score         *int          `json:"Score"`
	NewestImage   *ImageSummary `json:"NewestImage"`
	DownloadCount *int          `json:"DownloadCount"`
	StarCount     *int          `json:"StarCount"`
	IsBookmarked  *bool         `json:"IsBookmarked"`
}

Contains details about the repo

type ResolverRoot

type ResolverRoot interface {
	Query() QueryResolver
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL