Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.DS_Store
*.env

.idea/
vendor
11 changes: 0 additions & 11 deletions Dockerfile

This file was deleted.

9 changes: 0 additions & 9 deletions Gopkg.lock

This file was deleted.

30 changes: 0 additions & 30 deletions Gopkg.toml

This file was deleted.

17 changes: 13 additions & 4 deletions device/filament_device.go → device.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package device
package filament

import (
"time"
)

// Device represents the core fields for a LIFX light source
type Device struct {
ID string `json:"json"`
ID string `json:"id"`
UUID string `json:"uuid"`
Label string `json:"label"`
Connected bool `json:"connected"`
Expand Down Expand Up @@ -75,7 +75,16 @@ type State struct {
Selector string `json:"selector"`
Power string `json:"power"`
Fast bool `json:"fast"`
Brightness float64 `json:"brightnness"`
Brightness float64 `json:"brightness"`
Duration float64 `json:"duration"`
Infared float64 `json:"infared"`
Infrared float64 `json:"infrared"`
}

// Response is a generic slice of results from LIFX API
type Response struct {
Results []struct {
ID string `json:"id"`
Status string `json:"status"`
Label string `json:"label"`
} `json:"results"`
}
7 changes: 7 additions & 0 deletions errors.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package filament

import "errors"

var (
MissingTokenEndpointError = errors.New("missing access token or valid API endpoint")
)
Loading