move remaining structs
This commit is contained in:
parent
cc6645fb48
commit
e9a4d586b4
10
lights.go
10
lights.go
@ -7,6 +7,12 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
OK Status = "ok"
|
||||||
|
TimedOut Status = "timed_out"
|
||||||
|
Offline Status = "offline"
|
||||||
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
Status string
|
Status string
|
||||||
|
|
||||||
@ -34,6 +40,10 @@ type (
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func (s Status) Success() bool {
|
||||||
|
return s == OK
|
||||||
|
}
|
||||||
|
|
||||||
func (c *Client) SetState(selector string, state State) ([]Result, error) {
|
func (c *Client) SetState(selector string, state State) ([]Result, error) {
|
||||||
j, err := json.Marshal(state)
|
j, err := json.Marshal(state)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
11
structs.go
11
structs.go
@ -1,11 +0,0 @@
|
|||||||
package lifx
|
|
||||||
|
|
||||||
const (
|
|
||||||
OK Status = "ok"
|
|
||||||
TimedOut Status = "timed_out"
|
|
||||||
Offline Status = "offline"
|
|
||||||
)
|
|
||||||
|
|
||||||
func (s Status) Success() bool {
|
|
||||||
return s == OK
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user