generated

package
v0.0.0-...-5897a89 Latest Latest
Warning

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

Go to latest
Published: May 20, 2023 License: Apache-2.0 Imports: 13 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 ClusterAddonResolver

type ClusterAddonResolver interface {
	DisplayName(ctx context.Context, obj *v1alpha1.ClusterAddon) (string, error)
	Description(ctx context.Context, obj *v1alpha1.ClusterAddon) (string, error)
	Maintainer(ctx context.Context, obj *v1alpha1.ClusterAddon) (string, error)
	Source(ctx context.Context, obj *v1alpha1.ClusterAddon) (v1alpha1.AddonSource, error)
	SourceURL(ctx context.Context, obj *v1alpha1.ClusterAddon) (string, error)
}

type ClusterResolver

type ClusterResolver interface {
	Tenant(ctx context.Context, obj *v1alpha1.Cluster) (string, error)
	Track(ctx context.Context, obj *v1alpha1.Cluster) (v1alpha1.ReleaseTrack, error)

	Accessors(ctx context.Context, obj *v1alpha1.Cluster) ([]v1alpha1.AccessRef, error)
}

type ComplexityRoot

type ComplexityRoot struct {
	AccessRef struct {
		Group    func(childComplexity int) int
		ReadOnly func(childComplexity int) int
		User     func(childComplexity int) int
	}

	AddonBindingStatus struct {
		Name  func(childComplexity int) int
		Phase func(childComplexity int) int
	}

	Cluster struct {
		Accessors func(childComplexity int) int
		Name      func(childComplexity int) int
		Status    func(childComplexity int) int
		Tenant    func(childComplexity int) int
		Track     func(childComplexity int) int
	}

	ClusterAddon struct {
		Description func(childComplexity int) int
		DisplayName func(childComplexity int) int
		Logo        func(childComplexity int) int
		Maintainer  func(childComplexity int) int
		Name        func(childComplexity int) int
		Source      func(childComplexity int) int
		SourceURL   func(childComplexity int) int
	}

	ClusterStatus struct {
		KubeURL         func(childComplexity int) int
		KubeVersion     func(childComplexity int) int
		PlatformVersion func(childComplexity int) int
		WebURL          func(childComplexity int) int
	}

	MaintenanceWindow struct {
		Next     func(childComplexity int) int
		Schedule func(childComplexity int) int
	}

	Metric struct {
		Format func(childComplexity int) int
		Metric func(childComplexity int) int
		Name   func(childComplexity int) int
		Values func(childComplexity int) int
	}

	MetricValue struct {
		Time  func(childComplexity int) int
		Value func(childComplexity int) int
	}

	Mutation struct {
		ApproveTenant               func(childComplexity int, tenant string) int
		CreateCluster               func(childComplexity int, tenant string, input model.NewCluster) int
		CreateTenant                func(childComplexity int, tenant string) int
		DeleteCluster               func(childComplexity int, tenant string, cluster string) int
		InstallAddon                func(childComplexity int, tenant string, cluster string, addon string) int
		SetClusterAccessors         func(childComplexity int, tenant string, cluster string, accessors []model.AccessRefInput) int
		SetClusterMaintenanceWindow func(childComplexity int, tenant string, cluster string, window string) int
		SetTenantAccessors          func(childComplexity int, tenant string, accessors []model.AccessRefInput) int
		UninstallAddon              func(childComplexity int, tenant string, cluster string, addon string) int
	}

	NamespacedName struct {
		Name      func(childComplexity int) int
		Namespace func(childComplexity int) int
	}

	Query struct {
		Cluster                  func(childComplexity int, tenant string, cluster string) int
		ClusterAddons            func(childComplexity int, tenant string) int
		ClusterInstalledAddons   func(childComplexity int, tenant string, cluster string) int
		ClusterMaintenanceWindow func(childComplexity int, tenant string, cluster string) int
		ClusterMetrics           func(childComplexity int, tenant string, cluster string) int
		ClustersInTenant         func(childComplexity int, tenant string) int
		CurrentUser              func(childComplexity int) int
		HasClusterAccess         func(childComplexity int, tenant string, cluster string, write bool) int
		HasRole                  func(childComplexity int, role model.Role) int
		HasTenantAccess          func(childComplexity int, tenant string, write bool) int
		RenderKubeconfig         func(childComplexity int, tenant string, cluster string) int
		Tenant                   func(childComplexity int, tenant string) int
		Tenants                  func(childComplexity int) int
	}

	Tenant struct {
		Accessors        func(childComplexity int) int
		Name             func(childComplexity int) int
		ObservedClusters func(childComplexity int) int
		Owner            func(childComplexity int) int
		Status           func(childComplexity int) int
	}

	TenantStatus struct {
		Phase func(childComplexity int) int
	}

	User struct {
		Groups   func(childComplexity int) int
		Username func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
	HasClusterAccess func(ctx context.Context, obj interface{}, next graphql.Resolver, write bool) (res interface{}, err error)
	HasRole          func(ctx context.Context, obj interface{}, next graphql.Resolver, role model.Role) (res interface{}, err error)
	HasTenantAccess  func(ctx context.Context, obj interface{}, next graphql.Resolver, write bool) (res interface{}, err error)
}

type MutationResolver

type MutationResolver interface {
	CreateTenant(ctx context.Context, tenant string) (*v1alpha1.Tenant, error)
	CreateCluster(ctx context.Context, tenant string, input model.NewCluster) (*v1alpha1.Cluster, error)
	DeleteCluster(ctx context.Context, tenant string, cluster string) (bool, error)
	SetClusterAccessors(ctx context.Context, tenant string, cluster string, accessors []model.AccessRefInput) (bool, error)
	SetClusterMaintenanceWindow(ctx context.Context, tenant string, cluster string, window string) (bool, error)
	InstallAddon(ctx context.Context, tenant string, cluster string, addon string) (bool, error)
	UninstallAddon(ctx context.Context, tenant string, cluster string, addon string) (bool, error)
	ApproveTenant(ctx context.Context, tenant string) (bool, error)
	SetTenantAccessors(ctx context.Context, tenant string, accessors []model.AccessRefInput) (bool, error)
}

type QueryResolver

type QueryResolver interface {
	Tenants(ctx context.Context) ([]v1alpha1.Tenant, error)
	Tenant(ctx context.Context, tenant string) (*v1alpha1.Tenant, error)
	ClustersInTenant(ctx context.Context, tenant string) ([]v1alpha1.Cluster, error)
	Cluster(ctx context.Context, tenant string, cluster string) (*v1alpha1.Cluster, error)
	ClusterAddons(ctx context.Context, tenant string) ([]v1alpha1.ClusterAddon, error)
	ClusterInstalledAddons(ctx context.Context, tenant string, cluster string) ([]model.AddonBindingStatus, error)
	ClusterMaintenanceWindow(ctx context.Context, tenant string, cluster string) (*model.MaintenanceWindow, error)
	CurrentUser(ctx context.Context) (*model.User, error)
	ClusterMetrics(ctx context.Context, tenant string, cluster string) ([]model.Metric, error)
	RenderKubeconfig(ctx context.Context, tenant string, cluster string) (string, error)
	HasRole(ctx context.Context, role model.Role) (bool, error)
	HasTenantAccess(ctx context.Context, tenant string, write bool) (bool, error)
	HasClusterAccess(ctx context.Context, tenant string, cluster string, write bool) (bool, error)
}

type ResolverRoot

type ResolverRoot interface {
	Cluster() ClusterResolver
	ClusterAddon() ClusterAddonResolver
	Mutation() MutationResolver
	Query() QueryResolver
	Tenant() TenantResolver
}

type TenantResolver

type TenantResolver interface {
	Owner(ctx context.Context, obj *v1alpha1.Tenant) (string, error)
	ObservedClusters(ctx context.Context, obj *v1alpha1.Tenant) ([]v1alpha1.NamespacedName, error)

	Accessors(ctx context.Context, obj *v1alpha1.Tenant) ([]v1alpha1.AccessRef, error)
}

Jump to

Keyboard shortcuts

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