generated

package
v0.0.0-...-b0e7944 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: MIT 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 AirportResolver

type AirportResolver interface {
	Sensors(ctx context.Context, obj *model.Airport) ([]*model.Sensor, error)
	GetSubsetOfSensors(ctx context.Context, obj *model.Airport, sensorIds []string) ([]*model.Sensor, error)
}

type ComplexityRoot

type ComplexityRoot struct {
	Airport struct {
		GetSubsetOfSensors func(childComplexity int, sensorIds []string) int
		ID                 func(childComplexity int) int
		Name               func(childComplexity int) int
		Sensors            func(childComplexity int) int
	}

	MeasureMeanData struct {
		Airport   func(childComplexity int) int
		EndDate   func(childComplexity int) int
		ID        func(childComplexity int) int
		Sensor    func(childComplexity int) int
		StartDate func(childComplexity int) int
		Value     func(childComplexity int) int
	}

	Measurement struct {
		ID   func(childComplexity int) int
		Name func(childComplexity int) int
		Unit func(childComplexity int) int
	}

	Query struct {
		Airports       func(childComplexity int) int
		GetAirportByID func(childComplexity int, id string) int
	}

	Sensor struct {
		Airport                func(childComplexity int) int
		GetMeanMeasureInterval func(childComplexity int, start time.Time, end time.Time, discretize *string, discretizeMode *model.MeanMeasureMode) int
		GetMeanMeasures        func(childComplexity int, day *time.Time) int
		ID                     func(childComplexity int) int
		Measurement            func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
	Examples   func(ctx context.Context, obj interface{}, next graphql.Resolver, values []*string) (res interface{}, err error)
	Fake       func(ctx context.Context, obj interface{}, next graphql.Resolver, typeArg model.FakeTypes, options *model.FakeOptions, locale *model.FakeLocale) (res interface{}, err error)
	ListLength func(ctx context.Context, obj interface{}, next graphql.Resolver, min int, max int) (res interface{}, err error)
}

type QueryResolver

type QueryResolver interface {
	Airports(ctx context.Context) ([]*model.Airport, error)
	GetAirportByID(ctx context.Context, id string) (*model.Airport, error)
}

type ResolverRoot

type ResolverRoot interface {
	Airport() AirportResolver
	Query() QueryResolver
	Sensor() SensorResolver
}

type SensorResolver

type SensorResolver interface {
	GetMeanMeasureInterval(ctx context.Context, obj *model.Sensor, start time.Time, end time.Time, discretize *string, discretizeMode *model.MeanMeasureMode) ([]*model.MeasureMeanData, error)
	GetMeanMeasures(ctx context.Context, obj *model.Sensor, day *time.Time) ([]*model.MeasureMeanData, error)
}

Jump to

Keyboard shortcuts

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