Documentation
¶
Index ¶
- Variables
- type Bulb
- type BulbFileStore
- func (b *BulbFileStore) All() []Bulb
- func (b *BulbFileStore) AllNames() []string
- func (b *BulbFileStore) Delete(bulb Bulb)
- func (b *BulbFileStore) FindByID(id string) (Bulb, error)
- func (b *BulbFileStore) FindByName(name string) (Bulb, error)
- func (b *BulbFileStore) Flush() error
- func (b *BulbFileStore) Init() error
- func (b *BulbFileStore) Save(bulb Bulb)
- type Control
- func (c *Control) BackgroundToggle(name string) (err error)
- func (c *Control) Info(name string) (err error)
- func (c *Control) PowerToggle(name string) (err error)
- func (c *Control) SetBackgroundBright(name string, value int, effect yeelight.Effect, duration int) (err error)
- func (c *Control) SetBackgroundRGB(name string, value int, effect yeelight.Effect, duration int) (err error)
- func (c *Control) SetBackgroundTemperature(name string, value int, effect yeelight.Effect, duration int) (err error)
- func (c *Control) SetBright(name string, value int, effect yeelight.Effect, duration int) (err error)
- func (c *Control) SetRGB(name string, value int, effect yeelight.Effect, duration int) (err error)
- func (c *Control) SetTemperature(name string, value int, effect yeelight.Effect, duration int) (err error)
- type Manager
- type Printer
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBulbNotFound = errors.New("not found")
Functions ¶
This section is empty.
Types ¶
type BulbFileStore ¶
type BulbFileStore struct {
// contains filtered or unexported fields
}
func NewBulbFileStore ¶
func NewBulbFileStore(dir string) *BulbFileStore
func (*BulbFileStore) All ¶
func (b *BulbFileStore) All() []Bulb
func (*BulbFileStore) AllNames ¶
func (b *BulbFileStore) AllNames() []string
func (*BulbFileStore) Delete ¶
func (b *BulbFileStore) Delete(bulb Bulb)
func (*BulbFileStore) FindByName ¶
func (b *BulbFileStore) FindByName(name string) (Bulb, error)
func (*BulbFileStore) Flush ¶
func (b *BulbFileStore) Flush() error
func (*BulbFileStore) Init ¶
func (b *BulbFileStore) Init() error
func (*BulbFileStore) Save ¶
func (b *BulbFileStore) Save(bulb Bulb)
type Control ¶
type Control struct {
// contains filtered or unexported fields
}
func NewControl ¶
func NewControl(store *BulbFileStore, printer Printer) *Control
func (*Control) BackgroundToggle ¶
func (*Control) PowerToggle ¶
func (*Control) SetBackgroundBright ¶
func (*Control) SetBackgroundRGB ¶
func (*Control) SetBackgroundTemperature ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(store *BulbFileStore, names *pokemon.Names, printer Printer) *Manager
Click to show internal directories.
Click to hide internal directories.