Documentation
¶
Overview ¶
THIS CODE IS A STARTING POINT ONLY. IT WILL NOT BE UPDATED WITH SCHEMA CHANGES.
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 ComplexityRoot ¶
type ComplexityRoot struct {
Device struct {
ID func(childComplexity int) int
}
Entity struct {
FindDeviceByID func(childComplexity int, id string) int
}
Origin struct {
Device func(childComplexity int) int
Pos func(childComplexity int) int
}
Query struct {
Temperatures func(childComplexity int) int
// contains filtered or unexported fields
}
Temperature struct {
From func(childComplexity int) int
Temp func(childComplexity int) int
When func(childComplexity int) int
}
WGS84Position struct {
Lat func(childComplexity int) int
Lon func(childComplexity int) int
}
Service struct {
SDL func(childComplexity int) int
}
}
type Config ¶
type Config struct {
Resolvers ResolverRoot
Directives DirectiveRoot
Complexity ComplexityRoot
}
type DirectiveRoot ¶
type DirectiveRoot struct {
}
type EntityResolver ¶
type Origin ¶
type Origin struct {
Device *Device `json:"device"`
Pos *WGS84Position `json:"pos"`
}
type QueryResolver ¶
type QueryResolver interface {
Temperatures(ctx context.Context) ([]*Temperature, error)
}
type Resolver ¶
type Resolver struct{}
func (*Resolver) Entity ¶
func (r *Resolver) Entity() EntityResolver
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
type ResolverRoot ¶
type ResolverRoot interface {
Entity() EntityResolver
Query() QueryResolver
}
type Temperature ¶
type Temperature struct {
From *Origin `json:"from"`
When string `json:"when"`
Temp float64 `json:"temp"`
}
func (Temperature) IsTelemetry ¶
func (Temperature) IsTelemetry()
type WGS84Position ¶
Click to show internal directories.
Click to hide internal directories.