Documentation ¶
Index ¶
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- type ComplexityRoot
- type Config
- type DeviceResolver
- type DeviceResponse
- type DirectiveRoot
- type ElementResolver
- type ElementResponse
- type GroupResolver
- type GroupResponse
- type MutationResolver
- type QueryResolver
- type ResolverRoot
- type SceneResponse
- type SubscriptionResolver
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 { Elements func(childComplexity int) int Type func(childComplexity int) int } DeviceResponse struct { Addr func(childComplexity int) int Device func(childComplexity int) int } Element struct { Name func(childComplexity int) int State func(childComplexity int) int StateType func(childComplexity int) int } ElementResponse struct { Addr func(childComplexity int) int Element func(childComplexity int) int } Group struct { Devices func(childComplexity int) int Name func(childComplexity int) int Scenes func(childComplexity int) int } GroupResponse struct { Addr func(childComplexity int) int Group func(childComplexity int) int } Mutation struct { AddDevice func(childComplexity int, groupAddr int, devUUID string, name string) int AddGroup func(childComplexity int, name string) int AddUser func(childComplexity int) int ConfigHub func(childComplexity int) int EventBind func(childComplexity int, sceneNumber int, groupAddr int, devAddr int, elemAddr int) int RemoveDevice func(childComplexity int, devAddr int, groupAddr int) int RemoveGroup func(childComplexity int, groupAddr int) int ResetHub func(childComplexity int) int SceneDelete func(childComplexity int, sceneNumber int, groupAddr int) int SceneRecall func(childComplexity int, sceneNumber int, groupAddr int) int SceneStore func(childComplexity int, name string, groupAddr int) int SetState func(childComplexity int, groupAddr int, elemAddr int, value string) int } Query struct { AvailableDevices func(childComplexity int) int AvailableGroups func(childComplexity int) int GetUserPin func(childComplexity int) int } Scene struct { Name func(childComplexity int) int } SceneResponse struct { Number func(childComplexity int) int Scene func(childComplexity int) int } Subscription struct { WatchEvents func(childComplexity int) int WatchGroup func(childComplexity int, groupAddr int) int WatchState func(childComplexity int, groupAddr int, devAddr int, elemAddr int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DeviceResolver ¶
type DeviceResponse ¶
type DirectiveRoot ¶
type DirectiveRoot struct { }
type ElementResolver ¶
type ElementResponse ¶
type GroupResolver ¶
type GroupResponse ¶
type MutationResolver ¶
type MutationResolver interface { ConfigHub(ctx context.Context) (string, error) ResetHub(ctx context.Context) (bool, error) AddDevice(ctx context.Context, groupAddr int, devUUID string, name string) (int, error) RemoveDevice(ctx context.Context, devAddr int, groupAddr int) (int, error) AddGroup(ctx context.Context, name string) (int, error) RemoveGroup(ctx context.Context, groupAddr int) (int, error) AddUser(ctx context.Context) (string, error) SetState(ctx context.Context, groupAddr int, elemAddr int, value string) (bool, error) SceneStore(ctx context.Context, name string, groupAddr int) (int, error) SceneRecall(ctx context.Context, sceneNumber int, groupAddr int) (int, error) SceneDelete(ctx context.Context, sceneNumber int, groupAddr int) (int, error) EventBind(ctx context.Context, sceneNumber int, groupAddr int, devAddr int, elemAddr int) (int, error) }
type QueryResolver ¶
type ResolverRoot ¶
type ResolverRoot interface { Device() DeviceResolver Element() ElementResolver Group() GroupResolver Mutation() MutationResolver Query() QueryResolver Subscription() SubscriptionResolver }
type SceneResponse ¶
Click to show internal directories.
Click to hide internal directories.