Documentation ¶
Index ¶
- Constants
- func New() bus.Bus
- type SnapcastBus
- func (b *SnapcastBus) Deinitialize()
- func (b *SnapcastBus) Device(id string) (bus.Device, error)
- func (b *SnapcastBus) DeviceChanges() <-chan string
- func (b *SnapcastBus) DeviceIds() []string
- func (b *SnapcastBus) GetClientVolume(clientID string) (snapcast.Volume, error)
- func (b *SnapcastBus) GetServerStatus() (status *snapcast.ServerStatus, err error)
- func (b *SnapcastBus) Initialize(config interface{})
- func (b *SnapcastBus) SetClientVolume(clientID string, volume *snapcast.Volume) error
- func (b *SnapcastBus) String() string
- type SnapcastConfig
- type SnapcastDevice
- type SnapcastMuteDevice
- type SnapcastVolumeDevice
Constants ¶
View Source
const MuteDevicePrefix = "snapcast_audio_mute"
View Source
const VolumeDevicePrefix = "snapcast_audio_volume"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SnapcastBus ¶
type SnapcastBus struct {
// contains filtered or unexported fields
}
func (*SnapcastBus) Deinitialize ¶
func (b *SnapcastBus) Deinitialize()
Deinitialize is used when actuator is going off
func (*SnapcastBus) Device ¶
func (b *SnapcastBus) Device(id string) (bus.Device, error)
Given an unique id returns the corresponding device, an error if the id does not correspond to a device
func (*SnapcastBus) DeviceChanges ¶
func (b *SnapcastBus) DeviceChanges() <-chan string
Channel that returns the id of a device in the moment the device changes his status
func (*SnapcastBus) DeviceIds ¶
func (b *SnapcastBus) DeviceIds() []string
list of device ids this bus is handling
func (*SnapcastBus) GetClientVolume ¶
func (b *SnapcastBus) GetClientVolume(clientID string) (snapcast.Volume, error)
func (*SnapcastBus) GetServerStatus ¶
func (b *SnapcastBus) GetServerStatus() (status *snapcast.ServerStatus, err error)
func (*SnapcastBus) Initialize ¶
func (b *SnapcastBus) Initialize(config interface{})
func (*SnapcastBus) SetClientVolume ¶
func (b *SnapcastBus) SetClientVolume(clientID string, volume *snapcast.Volume) error
func (*SnapcastBus) String ¶
func (b *SnapcastBus) String() string
type SnapcastConfig ¶
type SnapcastConfig struct {
SnapcastServerAddress string `json:"server_address" mapstructure:"server_address"`
}
type SnapcastDevice ¶
type SnapcastDevice struct {
// contains filtered or unexported fields
}
type SnapcastMuteDevice ¶
type SnapcastMuteDevice SnapcastDevice
func (*SnapcastMuteDevice) Description ¶
func (d *SnapcastMuteDevice) Description() bus.DeviceDescription
func (*SnapcastMuteDevice) ID ¶
func (d *SnapcastMuteDevice) ID() string
func (*SnapcastMuteDevice) Kind ¶
func (d *SnapcastMuteDevice) Kind() bus.DeviceKind
func (*SnapcastMuteDevice) Toggle ¶
func (d *SnapcastMuteDevice) Toggle()
func (*SnapcastMuteDevice) TurnOff ¶
func (d *SnapcastMuteDevice) TurnOff()
func (*SnapcastMuteDevice) TurnOn ¶
func (d *SnapcastMuteDevice) TurnOn()
type SnapcastVolumeDevice ¶
type SnapcastVolumeDevice SnapcastDevice
func (*SnapcastVolumeDevice) AddValue ¶
func (d *SnapcastVolumeDevice) AddValue(value float64)
func (*SnapcastVolumeDevice) Description ¶
func (d *SnapcastVolumeDevice) Description() bus.DeviceDescription
func (*SnapcastVolumeDevice) ID ¶
func (d *SnapcastVolumeDevice) ID() string
func (*SnapcastVolumeDevice) Kind ¶
func (d *SnapcastVolumeDevice) Kind() bus.DeviceKind
func (*SnapcastVolumeDevice) SetValue ¶
func (d *SnapcastVolumeDevice) SetValue(value float64)
Click to show internal directories.
Click to hide internal directories.