Documentation
¶
Index ¶
- func GenerateStaticPages()
- func InitTemplates()
- func Serve()
- func ServeRootPage(w http.ResponseWriter, r *http.Request)
- func ServeStreamRequest(w http.ResponseWriter, r *http.Request)
- func Write404Page(w io.Writer)
- func WriteAboutPage(w io.Writer)
- func WriteFilterPage(w io.Writer, wpd WebpageData)
- type BasicResponseData
- type ByViewers
- type FastCGIServer
- type PanelGroup
- type StreamPanel
- type StreamResponseClip
- type StreamResponseData
- type StreamResponseThumb
- type Times
- type WebpageData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateStaticPages ¶
func GenerateStaticPages()
GenerateStaticPages writes files 404.html, about.html, etc.
func InitTemplates ¶
func InitTemplates()
InitTemplates initializes page templates from the included files
func ServeRootPage ¶
func ServeRootPage(w http.ResponseWriter, r *http.Request)
ServeRootPage serves a page listing all filters.
func ServeStreamRequest ¶
func ServeStreamRequest(w http.ResponseWriter, r *http.Request)
ServeStreamRequest serves a series of <a><img></a> tags for thumbs of a specified stream.
func WriteFilterPage ¶
func WriteFilterPage(w io.Writer, wpd WebpageData)
Types ¶
type BasicResponseData ¶
type BasicResponseData struct {
AppBaseUrl string
}
type FastCGIServer ¶
type FastCGIServer struct{}
func (FastCGIServer) ServeHTTP ¶
func (s FastCGIServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP computes responses for HTTP requests passed to the app.
type PanelGroup ¶
type PanelGroup struct { StreamPanels []StreamPanel Title string }
type StreamPanel ¶
type StreamPanel struct { StreamID uint ChannelDisplayName string ChannelName string CoverImages []string Title string Live bool Viewers int Length string OriginalIndex int FilterTop10 bool }
func PanelOfStream ¶
func PanelOfStream(stream database.Stream, index int) StreamPanel
PanelOfStream generates a StreamPanel based on a stream
type StreamResponseClip ¶
type StreamResponseData ¶
type StreamResponseData struct { Length string Thumbs []StreamResponseThumb Clips []StreamResponseClip }
type StreamResponseThumb ¶
type WebpageData ¶
type WebpageData struct { Title string AppBaseUrl string PanelGroups []PanelGroup }
func FilterPageData ¶
func FilterPageData(f database.Filter) WebpageData
FilterPageData generates a struct listing all streams of a filter.
Click to show internal directories.
Click to hide internal directories.