graph

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: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnauthorised   = errors.New("unauthorised")
	ErrForbidden      = errors.New("forbidden")
	ErrTenantNotReady = errors.New("tenant is not ready")
)

Functions

This section is empty.

Types

type KubeOpts

type KubeOpts struct {
	GroupPrefix    string
	UsernamePrefix string
}

type Resolver

type Resolver struct {
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

func NewResolver

func NewResolver(ctx context.Context, client client.Client, scheme *runtime.Scheme, prometheus promv1.API, prometheusConfig *v1.PrometheusConfig, kubeOpts KubeOpts, dexURL string, dexCA string) (*Resolver, error)

func (*Resolver) Cluster

func (r *Resolver) Cluster() generated.ClusterResolver

Cluster returns generated.ClusterResolver implementation.

func (*Resolver) ClusterAddon

func (r *Resolver) ClusterAddon() generated.ClusterAddonResolver

ClusterAddon returns generated.ClusterAddonResolver implementation.

func (*Resolver) GetMetric

func (r *Resolver) GetMetric(ctx context.Context, promQL string) ([]model.MetricValue, error)

func (*Resolver) GetMetrics

func (r *Resolver) GetMetrics(ctx context.Context, tenant, cluster string) ([]model.Metric, error)

func (*Resolver) HasClusterAccess

func (r *Resolver) HasClusterAccess(ctx context.Context, req any, next graphql.Resolver, write bool) (res any, err error)

func (*Resolver) HasRole

func (r *Resolver) HasRole(ctx context.Context, _ any, next graphql.Resolver, role model.Role) (any, error)

func (*Resolver) HasTenantAccess

func (r *Resolver) HasTenantAccess(ctx context.Context, req any, next graphql.Resolver, write bool) (res any, err error)

func (*Resolver) Mutation

func (r *Resolver) Mutation() generated.MutationResolver

Mutation returns generated.MutationResolver implementation.

func (*Resolver) Query

func (r *Resolver) Query() generated.QueryResolver

Query returns generated.QueryResolver implementation.

func (*Resolver) Tenant

func (r *Resolver) Tenant() generated.TenantResolver

Tenant returns generated.TenantResolver implementation.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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