device

package
v0.0.0-...-9423480 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2022 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorMessageAction

func ErrorMessageAction(w http.ResponseWriter, title string, status int)

func ErrorMethodNotAllowedAction

func ErrorMethodNotAllowedAction(w http.ResponseWriter, r *http.Request)

func ErrorNotFoundAction

func ErrorNotFoundAction(w http.ResponseWriter, r *http.Request)

func ErrorStatusAction

func ErrorStatusAction(w http.ResponseWriter, r *http.Request, status int)

func GlobalErrorAction

func GlobalErrorAction(w http.ResponseWriter, message string, status int)

Types

type Api

type Api struct {
	// contains filtered or unexported fields
}

func NewApi

func NewApi(config *config.ServerConfig) *Api

func (*Api) EventChannel

func (d *Api) EventChannel() chan event.ApiEvent

func (*Api) Start

func (d *Api) Start()

func (*Api) StopSendingEvent

func (d *Api) StopSendingEvent()

type Audio

type Audio struct {
	// contains filtered or unexported fields
}

func NewAudio

func NewAudio(serverState *config.ServerState) *Audio

func (*Audio) DecreaseVolume

func (w *Audio) DecreaseVolume()

func (*Audio) IncreaseVolume

func (w *Audio) IncreaseVolume()

func (*Audio) SetVolume

func (w *Audio) SetVolume(volume int64) error

func (*Audio) Start

func (w *Audio) Start()

func (*Audio) Stop

func (w *Audio) Stop()

type Button

type Button struct {
	// contains filtered or unexported fields
}

func NewButton

func NewButton(buttonId event.ButtonId, name string) *Button

func (*Button) Refresh

func (b *Button) Refresh(buttonEventChannel chan event.ButtonEvent)

type Buttons

type Buttons struct {
	// contains filtered or unexported fields
}

func NewButtons

func NewButtons(simulation bool) *Buttons

func (*Buttons) EventChannel

func (d *Buttons) EventChannel() chan event.ButtonEvent

func (*Buttons) Start

func (d *Buttons) Start()

func (*Buttons) StopSendingEvent

func (d *Buttons) StopSendingEvent()

type Clock

type Clock struct {
	// contains filtered or unexported fields
}

func NewClock

func NewClock(serverConfig *config.ServerConfig) *Clock

func (*Clock) ClearAlarm

func (d *Clock) ClearAlarm()

func (*Clock) EventChannel

func (d *Clock) EventChannel() chan event.TickerEvent

func (*Clock) IsAlarmRunning

func (d *Clock) IsAlarmRunning() bool

func (*Clock) Snooze

func (d *Clock) Snooze()

func (*Clock) Start

func (d *Clock) Start()

func (*Clock) StopSendingEvent

func (d *Clock) StopSendingEvent()

func (*Clock) TriggerAlarm

func (d *Clock) TriggerAlarm()

type Display

type Display struct {
	// contains filtered or unexported fields
}

func NewDisplay

func NewDisplay(simulationMode bool) *Display

func (*Display) IsOn

func (d *Display) IsOn() bool

func (*Display) SetOff

func (d *Display) SetOff()

func (*Display) SetOn

func (d *Display) SetOn()

func (*Display) ShowImage

func (d *Display) ShowImage(img image.Image)

func (*Display) Start

func (d *Display) Start()

func (*Display) Stop

func (d *Display) Stop()

func (*Display) Switch

func (d *Display) Switch() bool

type LocalPlaylistPlayer

type LocalPlaylistPlayer struct {
	// contains filtered or unexported fields
}

func (*LocalPlaylistPlayer) Clear

func (d *LocalPlaylistPlayer) Clear()

func (*LocalPlaylistPlayer) CurrentPlaylist

func (d *LocalPlaylistPlayer) CurrentPlaylist() *Playlist

func (*LocalPlaylistPlayer) CurrentSongName

func (d *LocalPlaylistPlayer) CurrentSongName() string

func (*LocalPlaylistPlayer) EventChannel

func (d *LocalPlaylistPlayer) EventChannel() chan event.PlaylistEvent

func (*LocalPlaylistPlayer) GetPlaylist

func (d *LocalPlaylistPlayer) GetPlaylist(playlistId apimodel.PlaylistId) *Playlist

func (*LocalPlaylistPlayer) NextSong

func (d *LocalPlaylistPlayer) NextSong()

func (*LocalPlaylistPlayer) Play

func (d *LocalPlaylistPlayer) Play(playlistId apimodel.PlaylistId) error

func (*LocalPlaylistPlayer) PlaylistCount

func (d *LocalPlaylistPlayer) PlaylistCount() int64

func (*LocalPlaylistPlayer) Start

func (d *LocalPlaylistPlayer) Start()

func (*LocalPlaylistPlayer) Stop

func (d *LocalPlaylistPlayer) Stop()

func (*LocalPlaylistPlayer) StopSendingEvent

func (d *LocalPlaylistPlayer) StopSendingEvent()

type MifasolPlaylistPlayer

type MifasolPlaylistPlayer struct {
	// contains filtered or unexported fields
}

func (*MifasolPlaylistPlayer) Clear

func (d *MifasolPlaylistPlayer) Clear()

func (*MifasolPlaylistPlayer) CurrentPlaylist

func (d *MifasolPlaylistPlayer) CurrentPlaylist() *Playlist

func (*MifasolPlaylistPlayer) CurrentSongName

func (d *MifasolPlaylistPlayer) CurrentSongName() string

func (*MifasolPlaylistPlayer) EventChannel

func (d *MifasolPlaylistPlayer) EventChannel() chan event.PlaylistEvent

func (*MifasolPlaylistPlayer) GetPlaylist

func (d *MifasolPlaylistPlayer) GetPlaylist(playlistId apimodel.PlaylistId) *Playlist

func (*MifasolPlaylistPlayer) NextSong

func (d *MifasolPlaylistPlayer) NextSong()

func (*MifasolPlaylistPlayer) Play

func (d *MifasolPlaylistPlayer) Play(playlistId apimodel.PlaylistId) error

func (*MifasolPlaylistPlayer) PlaylistCount

func (d *MifasolPlaylistPlayer) PlaylistCount() int64

func (*MifasolPlaylistPlayer) Start

func (d *MifasolPlaylistPlayer) Start()

func (*MifasolPlaylistPlayer) Stop

func (d *MifasolPlaylistPlayer) Stop()

func (*MifasolPlaylistPlayer) StopSendingEvent

func (d *MifasolPlaylistPlayer) StopSendingEvent()

type Playlist

type Playlist struct {
	PlaylistId apimodel.PlaylistId
	Name       string
}

type PlaylistPlayer

type PlaylistPlayer interface {
	Start()
	StopSendingEvent()
	Stop()
	EventChannel() chan event.PlaylistEvent
	PlaylistCount() int64
	GetPlaylist(playlistId apimodel.PlaylistId) *Playlist
	Play(playlistId apimodel.PlaylistId) error
	CurrentPlaylist() *Playlist
	CurrentSongName() string
	Clear()
	NextSong()
}

func NewLocalPlaylistPlayer

func NewLocalPlaylistPlayer(playlistFolder string) PlaylistPlayer

func NewMifasolPlaylistPlayer

func NewMifasolPlaylistPlayer(mifasolParam *config.MifasolParam) PlaylistPlayer

type WebradioPlayer

type WebradioPlayer struct {
	// contains filtered or unexported fields
}

func NewWebradioPlayer

func NewWebradioPlayer(config *config.ServerConfig) *WebradioPlayer

func (*WebradioPlayer) Clear

func (d *WebradioPlayer) Clear()

func (*WebradioPlayer) CurrentWebRadio

func (d *WebradioPlayer) CurrentWebRadio() *config.Webradio

func (*WebradioPlayer) EventChannel

func (d *WebradioPlayer) EventChannel() chan event.WebradioEvent

func (*WebradioPlayer) Play

func (d *WebradioPlayer) Play(radioId apimodel.WebradioId) error

func (*WebradioPlayer) Start

func (d *WebradioPlayer) Start()

func (*WebradioPlayer) Stop

func (d *WebradioPlayer) Stop()

func (*WebradioPlayer) StopSendingEvent

func (d *WebradioPlayer) StopSendingEvent()

func (*WebradioPlayer) Webradio

func (d *WebradioPlayer) Webradio(webradioId apimodel.WebradioId) *config.Webradio

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL