Documentation
¶
Index ¶
- Constants
- Variables
- func Authenticate()
- func FiltersEnabled() bool
- func GetAuthURL() string
- func GetFilter(w http.ResponseWriter, req *http.Request)
- func HandleUpdate(w http.ResponseWriter, req *http.Request)
- func InitializeSonos()
- func LoadConfig(file string)
- func Monitor()
- func ParentalControlsEnabled() bool
- func Rules(track *spotify.FullTrack, device string) bool
- func Server()
- func SetParentalControls(b bool)
- func SetupEvents(mgr ssdp.Manager)
- func StartMonitor()
- func StartServer()
- func ToggleFilter(w http.ResponseWriter, req *http.Request)
- type Config
- type Equalizer
- type GroupState
- type MuteChange
- type PlayMode
- type Player
- type Rule
- type State
- type Track
- type TransportState
- type Update
- type VolumeChange
Constants ¶
Variables ¶
View Source
var (
LogFilter *logutils.LevelFilter
)
Functions ¶
func Authenticate ¶
func Authenticate()
func FiltersEnabled ¶
func FiltersEnabled() bool
func GetAuthURL ¶
func GetAuthURL() string
func HandleUpdate ¶
func HandleUpdate(w http.ResponseWriter, req *http.Request)
func InitializeSonos ¶
func InitializeSonos()
func LoadConfig ¶
func LoadConfig(file string)
func ParentalControlsEnabled ¶
func ParentalControlsEnabled() bool
func SetParentalControls ¶
func SetParentalControls(b bool)
func SetupEvents ¶
func StartMonitor ¶
func StartMonitor()
func StartServer ¶
func StartServer()
func ToggleFilter ¶
func ToggleFilter(w http.ResponseWriter, req *http.Request)
Types ¶
type Config ¶
type Config struct {
Ignored []string `json:"ignored"`
ClientId string `json:"client_id"`
ClientSecret string `json:"client_secret"`
RedirectURI string `json:"redirect_uri"`
AuthTokenURI string `json:"auth_token_uri"`
CertificateFile string `json:"cert"`
KeyFile string `json:"key"`
Port string `json:"port"`
LogLevel logutils.LogLevel `json:"log_level"`
}
type GroupState ¶
type MuteChange ¶
type State ¶
type State struct {
CurrentTrack Track `json:"currentTrack"`
NextTrack Track `json:"nextTrack"`
PlayMode PlayMode `json:"playMode"`
PlaylistName string `json:"playlistName"`
RelTime int `json:"relTime"`
StateTime int `json:"stateTime"`
Volume int `json:"volume"`
Mute bool `json:"mute"`
TrackNo int `json:"trackNo"`
PlaybackState string `json:"playbackState"`
Equalizer Equalizer `json:"equalizer"`
ElapsedTime int `json:"elapsedTime"`
ElapsedTimeFormatted string `json:"elapsedTimeFormatted"`
}
type Track ¶
type Track struct {
Artist string `json:"artist"`
Title string `json:"title"`
Album string `json:"album"`
AlbumArtUri string `json:"albumArtUri"`
Duration int `json:"duration"`
Uri string `json:"uri"`
Type string `json:"type"`
StationName string `json:"stationName"`
AbsoluteAlbumArtUri string `json:"absoluteAlbumArtUri"`
}
type TransportState ¶
type TransportState struct {
Player Player `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.