This commit is contained in:
Wlad Meixner 2019-02-09 17:38:50 +01:00
parent 4fbc421fc2
commit 17546acf17

View File

@ -8,11 +8,16 @@ import (
"net/http" "net/http"
) )
// -------------------------------------------------------------
// Interfaces
// -------------------------------------------------------------
// Bridge is the hue bridge interface // Bridge is the hue bridge interface
type Bridge struct { type Bridge struct {
Config *Config Config *Config
} }
// BridgeUserConfig is the config provided for hue for a user
type BridgeUserConfig struct { type BridgeUserConfig struct {
Name string `json:"name"` Name string `json:"name"`
APIVersion string `json:"apiversion"` APIVersion string `json:"apiversion"`
@ -24,6 +29,10 @@ type BridgeUserConfig struct {
ReplacesBridgeID string `json:"replacesbridgeid"` ReplacesBridgeID string `json:"replacesbridgeid"`
} }
// -------------------------------------------------------------
// Methods
// -------------------------------------------------------------
// NewBridge creates a new bridge api instance // NewBridge creates a new bridge api instance
func NewBridge(conf *Config) *Bridge { func NewBridge(conf *Config) *Bridge {
return &Bridge{ return &Bridge{