Documentation ¶
Index ¶
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- type ComplexityRoot
- type Config
- type DirectiveRoot
- type HysteriaSettingsResolver
- type ManualSettingsResolver
- type MutationResolver
- type PidSettingsResolver
- type QueryResolver
- type ResolverRoot
- type SwitchResolver
- type TemperatureControllerResolver
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 { DeleteTemperatureControllerReturnType struct { ID func(childComplexity int) int TemperatureProbes func(childComplexity int) int } HysteriaSettings struct { Configured func(childComplexity int) int ID func(childComplexity int) int MaxTemp func(childComplexity int) int MinTemp func(childComplexity int) int MinTime func(childComplexity int) int } ManualSettings struct { Configured func(childComplexity int) int CycleTime func(childComplexity int) int DutyCycle func(childComplexity int) int ID func(childComplexity int) int } Mutation struct { AssignProbe func(childComplexity int, name string, address string) int DeleteSwitch func(childComplexity int, id string) int DeleteTemperatureController func(childComplexity int, id string) int ModifySwitch func(childComplexity int, switchSettings model.SwitchSettingsInput) int RemoveProbeFromTemperatureController func(childComplexity int, address string) int ToggleSwitch func(childComplexity int, id string, mode model.SwitchMode) int UpdateSettings func(childComplexity int, settings model.SettingsInput) int UpdateTemperatureController func(childComplexity int, controllerSettings model.TemperatureControllerSettingsInput) int } PidSettings struct { Configured func(childComplexity int) int CycleTime func(childComplexity int) int Delay func(childComplexity int) int Derivative func(childComplexity int) int Gpio func(childComplexity int) int ID func(childComplexity int) int Integral func(childComplexity int) int Proportional func(childComplexity int) int } Query struct { FetchProbes func(childComplexity int, addresses []*string) int Probe func(childComplexity int, address *string) int ProbeList func(childComplexity int, available *bool) int Settings func(childComplexity int) int Switches func(childComplexity int) int TemperatureControllers func(childComplexity int, name *string) int } Settings struct { BreweryName func(childComplexity int) int } Switch struct { Gpio func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int State func(childComplexity int) int } TempProbeDetails struct { ID func(childComplexity int) int Name func(childComplexity int) int PhysAddr func(childComplexity int) int Reading func(childComplexity int) int Updated func(childComplexity int) int } TemperatureController struct { CalculatedDuty func(childComplexity int) int CoolSettings func(childComplexity int) int DutyCycle func(childComplexity int) int HeatSettings func(childComplexity int) int HysteriaSettings func(childComplexity int) int ID func(childComplexity int) int ManualSettings func(childComplexity int) int Mode func(childComplexity int) int Name func(childComplexity int) int PreviousCalculationTime func(childComplexity int) int SetPoint func(childComplexity int) int TempProbeDetails func(childComplexity int) int } TemperatureProbe struct { PhysAddr func(childComplexity int) int Reading func(childComplexity int) int Updated func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type ManualSettingsResolver ¶
type MutationResolver ¶
type MutationResolver interface { AssignProbe(ctx context.Context, name string, address string) (*devices.TemperatureController, error) RemoveProbeFromTemperatureController(ctx context.Context, address string) (*devices.TemperatureController, error) UpdateTemperatureController(ctx context.Context, controllerSettings model.TemperatureControllerSettingsInput) (*devices.TemperatureController, error) DeleteTemperatureController(ctx context.Context, id string) (*model.DeleteTemperatureControllerReturnType, error) UpdateSettings(ctx context.Context, settings model.SettingsInput) (*system.Settings, error) ModifySwitch(ctx context.Context, switchSettings model.SwitchSettingsInput) (*devices.Switch, error) DeleteSwitch(ctx context.Context, id string) (*devices.Switch, error) ToggleSwitch(ctx context.Context, id string, mode model.SwitchMode) (*devices.Switch, error) }
type PidSettingsResolver ¶
type QueryResolver ¶
type QueryResolver interface { Probe(ctx context.Context, address *string) (*model.TemperatureProbe, error) ProbeList(ctx context.Context, available *bool) ([]*model.TemperatureProbe, error) FetchProbes(ctx context.Context, addresses []*string) ([]*model.TemperatureProbe, error) TemperatureControllers(ctx context.Context, name *string) ([]*devices.TemperatureController, error) Settings(ctx context.Context) (*system.Settings, error) Switches(ctx context.Context) ([]*devices.Switch, error) }
type ResolverRoot ¶
type ResolverRoot interface { HysteriaSettings() HysteriaSettingsResolver ManualSettings() ManualSettingsResolver Mutation() MutationResolver PidSettings() PidSettingsResolver Query() QueryResolver Switch() SwitchResolver TemperatureController() TemperatureControllerResolver }
type SwitchResolver ¶
type TemperatureControllerResolver ¶
type TemperatureControllerResolver interface { ID(ctx context.Context, obj *devices.TemperatureController) (string, error) TempProbeDetails(ctx context.Context, obj *devices.TemperatureController) ([]*model.TempProbeDetails, error) }
Click to show internal directories.
Click to hide internal directories.