search

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: Apache-2.0 Imports: 18 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 CVEResultForImage

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

type ComplexityRoot

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
	}

	ImageInfo struct {
		Description func(childComplexity int) int
		Labels      func(childComplexity int) int
		LastUpdated func(childComplexity int) int
		Latest      func(childComplexity int) int
		Licenses    func(childComplexity int) int
		Name        func(childComplexity int) int
		Size        func(childComplexity int) int
		Vendor      func(childComplexity int) int
	}

	ImgResultForCve struct {
		Name func(childComplexity int) int
		Tags func(childComplexity int) int
	}

	ImgResultForDigest struct {
		Name func(childComplexity int) int
		Tags func(childComplexity int) int
	}

	ImgResultForFixedCve struct {
		Tags func(childComplexity int) int
	}

	LayerInfo struct {
		Digest func(childComplexity int) int
		Size   func(childComplexity int) int
	}

	ManifestInfo struct {
		Digest   func(childComplexity int) int
		IsSigned func(childComplexity int) int
		Layers   func(childComplexity int) int
		Tag      func(childComplexity int) int
	}

	PackageInfo struct {
		FixedVersion     func(childComplexity int) int
		InstalledVersion func(childComplexity int) int
		Name             func(childComplexity int) int
	}

	Query struct {
		CVEListForImage        func(childComplexity int, image string) int
		ExpandedRepoInfo       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
		ImageListWithLatestTag func(childComplexity int) int
	}

	RepoInfo struct {
		Manifests func(childComplexity int) int
	}

	TagInfo struct {
		Digest    func(childComplexity int) int
		Name      func(childComplexity int) int
		Timestamp func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

func GetResolverConfig

func GetResolverConfig(log log.Logger, storeController storage.StoreController, enableCVE bool) Config

GetResolverConfig ...

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"`
}

type DirectiveRoot

type DirectiveRoot struct {
	Deprecated func(ctx context.Context, obj interface{}, next graphql.Resolver, reason *string) (res interface{}, err error)
	Include    func(ctx context.Context, obj interface{}, next graphql.Resolver, ifArg bool) (res interface{}, err error)
	Skip       func(ctx context.Context, obj interface{}, next graphql.Resolver, ifArg bool) (res interface{}, err error)
}

type ImageInfo

type ImageInfo struct {
	Name        *string    `json:"Name"`
	Latest      *string    `json:"Latest"`
	LastUpdated *time.Time `json:"LastUpdated"`
	Description *string    `json:"Description"`
	Licenses    *string    `json:"Licenses"`
	Vendor      *string    `json:"Vendor"`
	Size        *string    `json:"Size"`
	Labels      *string    `json:"Labels"`
}

type ImgResultForCve

type ImgResultForCve struct {
	Name *string   `json:"Name"`
	Tags []*string `json:"Tags"`
}

type ImgResultForDigest

type ImgResultForDigest struct {
	Name *string   `json:"Name"`
	Tags []*string `json:"Tags"`
}

type ImgResultForFixedCve

type ImgResultForFixedCve struct {
	Tags []*TagInfo `json:"Tags"`
}

type LayerInfo added in v1.3.8

type LayerInfo struct {
	Size   *string `json:"Size"`
	Digest *string `json:"Digest"`
}

type ManifestInfo added in v1.3.8

type ManifestInfo struct {
	Digest   *string      `json:"Digest"`
	Tag      *string      `json:"Tag"`
	IsSigned *bool        `json:"IsSigned"`
	Layers   []*LayerInfo `json:"Layers"`
}

type PackageInfo

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

type QueryResolver

type QueryResolver interface {
	CVEListForImage(ctx context.Context, image string) (*CVEResultForImage, error)
	ImageListForCve(ctx context.Context, id string) ([]*ImgResultForCve, error)
	ImageListWithCVEFixed(ctx context.Context, id string, image string) (*ImgResultForFixedCve, error)
	ImageListForDigest(ctx context.Context, id string) ([]*ImgResultForDigest, error)
	ImageListWithLatestTag(ctx context.Context) ([]*ImageInfo, error)
	ExpandedRepoInfo(ctx context.Context, repo string) (*RepoInfo, error)
}

type RepoInfo added in v1.3.8

type RepoInfo struct {
	Manifests []*ManifestInfo `json:"Manifests"`
}

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

Resolver ...

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

Query ...

type ResolverRoot

type ResolverRoot interface {
	Query() QueryResolver
}

type TagInfo

type TagInfo struct {
	Name      *string    `json:"Name"`
	Digest    *string    `json:"Digest"`
	Timestamp *time.Time `json:"Timestamp"`
}

Directories

Path Synopsis
Package common ...
Package common ...
Package cveinfo ...
Package cveinfo ...

Jump to

Keyboard shortcuts

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