-
Notifications
You must be signed in to change notification settings - Fork 0
/
hue.go
72 lines (60 loc) · 2.34 KB
/
hue.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package hue
import "context"
type AllBridgeParams struct {
Method string
}
type SearchParams struct {
Devices []string `json:"deviceid"`
}
type UserKey struct{}
type HostKey struct{}
type Client interface {
AllLights(context.Context) ([]interface{}, error)
NewLights(context.Context) (interface{}, error)
SearchLights(context.Context, []string) error
GetLight(context.Context, int) (interface{}, error)
RenameLight(context.Context, string, string) (interface{}, error)
LightState(context.Context, int, interface{}) (interface{}, error)
Toggle(context.Context, int) (interface{}, error)
DeleteLight(context.Context, string) error
AllGroups(context.Context) ([]interface{}, error)
CreateGroup(context.Context, interface{}) (interface{}, error)
GetGroup(context.Context, string) (interface{}, error)
SaveGroup(context.Context, string, interface{}) (interface{}, error)
SetGroupState(context.Context, string, interface{}) (interface{}, error)
DeleteGroup(context.Context, string) error
AllSchedules() ([]interface{}, error)
CreateSchedule(interface{}) (interface{}, error)
GetSchedule(string) (interface{}, error)
SetSchedule(string, interface{}) (interface{}, error)
DeleteSchedule(string) error
AllScenes() ([]interface{}, error)
GetScene(string) (interface{}, error)
CreateScene(interface{}) (interface{}, error)
SetScene(string, interface{}) (interface{}, error)
DeleteScene(string) error
AllSensors() ([]interface{}, error)
CreateSensor(interface{}) (interface{}, error)
SearchSensors() error
NewSensors() ([]interface{}, error)
GetSensor(string) (interface{}, error)
SetSensor(string, interface{}) (interface{}, error)
RenameSensor(string, string) (interface{}, error)
DeleteSensor(string) error
AllRules() ([]interface{}, error)
GetRule(string) (interface{}, error)
CreateRule(interface{}) (interface{}, error)
UpdateRule(string, interface{}) (interface{}, error)
DeleteRule(string) error
AllBridges(context.Context, interface{}) ([]interface{}, error)
CreateUser(interface{}) (interface{}, error)
GetConfig(context.Context) (interface{}, error)
ModifyConfig(interface{}) (interface{}, error)
Unwhitelist(string) error
GetFullState(context.Context) (interface{}, error)
}
type Bridge struct {
ID string `json:"id"`
InternalIPAddress string `json:"internalipaddress"`
MacAddress string `json:"macaddress"`
}