Documentation
¶
Index ¶
- Constants
- type API
- type Config
- type EventName
- type LastPlayed
- type Listeners
- type NowPlaying
- type Queue
- type SearchInput
- type Stream
- func (s *Stream) MessageCache(event EventName, data templates.TemplateSelectable) func(r *http.Request) ([]byte, error)
- func (s *Stream) NewMessage(ctx context.Context, event EventName, data templates.TemplateSelectable) message
- func (s *Stream) SendEvent(event EventName, m message)
- func (s *Stream) SendLastPlayed(ctx context.Context, data []radio.Song)
- func (s *Stream) SendListeners(ctx context.Context, data radio.Listeners)
- func (s *Stream) SendNowPlaying(ctx context.Context, data radio.Status)
- func (s *Stream) SendQueue(ctx context.Context, data radio.Queue)
- func (s *Stream) SendStreamer(ctx context.Context, data radio.User)
- func (s *Stream) SendThread(ctx context.Context, data radio.Thread)
- func (s *Stream) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Stream) Shutdown()
- type Streamer
- type Thread
Constants ¶
View Source
const ( RequestTrackArgument = "trackid" RequestSourceArgument = "s" )
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
Search radio.SearchService
Templates templates.Executor
// contains filtered or unexported fields
}
func (*API) PostRequest ¶
func (a *API) PostRequest(w http.ResponseWriter, r *http.Request)
func (*API) SearchHTML ¶
func (a *API) SearchHTML(w http.ResponseWriter, r *http.Request)
type LastPlayed ¶
LastPlayed is for the lastplayed listing on the home page
func (LastPlayed) TemplateBundle ¶
func (LastPlayed) TemplateBundle() string
func (LastPlayed) TemplateName ¶
func (LastPlayed) TemplateName() string
type Listeners ¶
Listeners is for the listener amount indicator on the home page
func (Listeners) TemplateBundle ¶
func (Listeners) TemplateName ¶
type NowPlaying ¶
NowPlaying is for what is currently playing on the home page
func (NowPlaying) TemplateBundle ¶
func (NowPlaying) TemplateBundle() string
func (NowPlaying) TemplateName ¶
func (NowPlaying) TemplateName() string
type Queue ¶
Queue is for the queue listing on the home page
func (Queue) RequestAmount ¶
func (Queue) TemplateBundle ¶
func (Queue) TemplateName ¶
type SearchInput ¶
type SearchInput struct {
}
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) MessageCache ¶
func (*Stream) NewMessage ¶
func (*Stream) SendLastPlayed ¶
func (*Stream) SendListeners ¶
func (*Stream) SendNowPlaying ¶
type Streamer ¶
Streamer is for the DJ indicator on the home page
func (Streamer) TemplateBundle ¶
func (Streamer) TemplateName ¶
Click to show internal directories.
Click to hide internal directories.