graph

package
v1.10.21 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: MIT Imports: 19 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.

func SliceToSliceOfPointers

func SliceToSliceOfPointers[T interface{}](in []T) (out []*T)

!!! WARNING !!! The code below was going to be deleted when updating resolvers. It has been copied here so you have one last chance to move it out of harms way if you want. There are two reasons this happens:

  • When renaming or deleting a resolver the old code will be put in here. You can safely delete it when you're done.
  • You have helper methods in this file. Move them out to keep these resolver files clean.

Types

type ComplexityRoot

type ComplexityRoot struct {
	Event struct {
		Resource   func(childComplexity int) int
		ResourceId func(childComplexity int) int
		Type       func(childComplexity int) int
	}

	Executor struct {
		Args             func(childComplexity int) int
		Command          func(childComplexity int) int
		ContentTypes     func(childComplexity int) int
		ExecutorType     func(childComplexity int) int
		Features         func(childComplexity int) int
		Image            func(childComplexity int) int
		ImagePullSecrets func(childComplexity int) int
		JobTemplate      func(childComplexity int) int
		Labels           func(childComplexity int) int
		Meta             func(childComplexity int) int
		Types            func(childComplexity int) int
		Uri              func(childComplexity int) int
	}

	ExecutorDetails struct {
		Event    func(childComplexity int) int
		Executor func(childComplexity int) int
		Name     func(childComplexity int) int
	}

	ExecutorMeta struct {
		DocsURI  func(childComplexity int) int
		IconURI  func(childComplexity int) int
		Tooltips func(childComplexity int) int
	}

	LocalObjectReference struct {
		Name func(childComplexity int) int
	}

	Query struct {
		Executors func(childComplexity int) int
	}

	Subscription struct {
		Executors func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type EventResolver

type EventResolver interface {
	Type(ctx context.Context, obj *testkube.Event) (*string, error)
	Resource(ctx context.Context, obj *testkube.Event) (*string, error)
}

type ExecutorDetailsResolver

type ExecutorDetailsResolver interface {
	Event(ctx context.Context, obj *testkube.ExecutorDetails) (*testkube.Event, error)
}

type ExecutorMetaResolver

type ExecutorMetaResolver interface {
	Tooltips(ctx context.Context, obj *testkube.ExecutorMeta) (*string, error)
}

type ExecutorResolver

type ExecutorResolver interface {
	Features(ctx context.Context, obj *testkube.Executor) ([]*model.FeaturesListItem, error)

	Labels(ctx context.Context, obj *testkube.Executor) (*string, error)
}

type QueryResolver

type QueryResolver interface {
	Executors(ctx context.Context) ([]*testkube.Executor, error)
}

type Resolver

type Resolver struct {
	Bus    bus.Bus
	Log    *zap.SugaredLogger
	Client *executorsclientv1.ExecutorsClient
}

func (*Resolver) Event

func (r *Resolver) Event() EventResolver

Event returns EventResolver implementation.

func (*Resolver) Executor

func (r *Resolver) Executor() ExecutorResolver

Executor returns ExecutorResolver implementation.

func (*Resolver) ExecutorDetails

func (r *Resolver) ExecutorDetails() ExecutorDetailsResolver

ExecutorDetails returns ExecutorDetailsResolver implementation.

func (*Resolver) ExecutorMeta

func (r *Resolver) ExecutorMeta() ExecutorMetaResolver

ExecutorMeta returns ExecutorMetaResolver implementation.

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

Query returns QueryResolver implementation.

func (*Resolver) Subscription

func (r *Resolver) Subscription() SubscriptionResolver

Subscription returns SubscriptionResolver implementation.

type ResolverRoot

type ResolverRoot interface {
	Event() EventResolver
	Executor() ExecutorResolver
	ExecutorDetails() ExecutorDetailsResolver
	ExecutorMeta() ExecutorMetaResolver
	Query() QueryResolver
	Subscription() SubscriptionResolver
}

type SubscriptionResolver

type SubscriptionResolver interface {
	Executors(ctx context.Context) (<-chan []testkube.ExecutorDetails, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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