Documentation ¶
Index ¶
- Constants
- type API
- type EventName
- type LastPlayed
- type Listeners
- type NowPlaying
- type Queue
- type SearchInput
- type Stream
- func (s *Stream) NewMessage(event EventName, data templates.TemplateSelectable) message
- func (s *Stream) SendEvent(event EventName, m message)
- func (s *Stream) SendLastPlayed(data []radio.Song)
- func (s *Stream) SendListeners(data radio.Listeners)
- func (s *Stream) SendNowPlaying(data radio.Status)
- func (s *Stream) SendQueue(data []radio.QueueEntry)
- func (s *Stream) SendStreamer(data radio.User)
- func (s *Stream) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Stream) Shutdown()
- type Streamer
Constants ¶
View Source
const ( SUBSCRIBE = "subscribe" SEND = "send" LEAVE = "leave" SHUTDOWN = "shutdown" INIT = "init" )
View Source
const ( EventTime = "time" EventMetadata = "metadata" EventListeners = "listeners" EventStreamer = "streamer" EventQueue = "queue" EventLastPlayed = "lastplayed" EventThread = "thread" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { Context context.Context Config config.Config Search radio.SearchService Templates templates.Executor // contains filtered or unexported fields }
func (*API) SearchHTML ¶
func (a *API) SearchHTML(w http.ResponseWriter, r *http.Request)
type LastPlayed ¶
func (LastPlayed) TemplateBundle ¶
func (LastPlayed) TemplateBundle() string
func (LastPlayed) TemplateName ¶
func (LastPlayed) TemplateName() string
type NowPlaying ¶
func (NowPlaying) TemplateBundle ¶
func (NowPlaying) TemplateBundle() string
func (NowPlaying) TemplateName ¶
func (NowPlaying) TemplateName() string
type Queue ¶
type Queue []radio.QueueEntry
func (Queue) TemplateBundle ¶
func (Queue) TemplateName ¶
type SearchInput ¶
type SearchInput struct {
Result *radio.SearchResult
}
func (SearchInput) TemplateBundle ¶
func (SearchInput) TemplateBundle() string
func (SearchInput) TemplateName ¶
func (SearchInput) TemplateName() string
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
func (*Stream) NewMessage ¶
func (s *Stream) NewMessage(event EventName, data templates.TemplateSelectable) message
func (*Stream) SendLastPlayed ¶
func (*Stream) SendListeners ¶
func (*Stream) SendNowPlaying ¶
func (*Stream) SendQueue ¶
func (s *Stream) SendQueue(data []radio.QueueEntry)
func (*Stream) SendStreamer ¶
Click to show internal directories.
Click to hide internal directories.