generated

package
v0.0.0-...-c4bdd08 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2021 License: MIT Imports: 14 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 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 HysteriaSettingsResolver

type HysteriaSettingsResolver interface {
	ID(ctx context.Context, obj *devices.HysteriaSettings) (string, error)
}

type ManualSettingsResolver

type ManualSettingsResolver interface {
	ID(ctx context.Context, obj *devices.ManualSettings) (string, error)
}

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 PidSettingsResolver interface {
	ID(ctx context.Context, obj *devices.PidSettings) (string, error)
}

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 SwitchResolver interface {
	ID(ctx context.Context, obj *devices.Switch) (string, error)
}

type TemperatureControllerResolver

type TemperatureControllerResolver interface {
	ID(ctx context.Context, obj *devices.TemperatureController) (string, error)

	TempProbeDetails(ctx context.Context, obj *devices.TemperatureController) ([]*model.TempProbeDetails, error)
}

Jump to

Keyboard shortcuts

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