Documentation ¶
Index ¶
- func ServeChanList(runtime RuntimeUtils) func(http.ResponseWriter, *http.Request)
- func ServeChanRedir(runtime RuntimeUtils) func(http.ResponseWriter, *http.Request)
- func ServeEPG(runtime RuntimeUtils) func(http.ResponseWriter, *http.Request)
- func ServeRuvRedir(runtime RuntimeUtils) func(http.ResponseWriter, *http.Request)
- type AuthResponse
- type CacheClient
- type Channel
- type Config
- type EPG
- type FakeCache
- type JSONEvent
- type Programme
- type RuntimeUtils
- type RuvChannelResponse
- type SSEpg
- type SSEpgChannel
- type SSEpgEvent
- type TextLang
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServeChanList ¶
func ServeChanList(runtime RuntimeUtils) func(http.ResponseWriter, *http.Request)
ServeChanList Serve the combined m3u playlist
func ServeChanRedir ¶
func ServeChanRedir(runtime RuntimeUtils) func(http.ResponseWriter, *http.Request)
ServeChanRedir Redirect to authenticated m3u8 stream
func ServeEPG ¶
func ServeEPG(runtime RuntimeUtils) func(http.ResponseWriter, *http.Request)
ServeEPG Serve the combined EPG
func ServeRuvRedir ¶
func ServeRuvRedir(runtime RuntimeUtils) func(http.ResponseWriter, *http.Request)
ServeRuvRedir Redirect to geoblocked ruv m3u8 stream
Types ¶
type AuthResponse ¶
AuthResponse Authentication json response
type CacheClient ¶
type CacheClient interface { Get(key string) (string, error) Set(key string, value string, expiration time.Duration) error }
CacheClient Interface for cacheclient
type Channel ¶
type Channel struct { Text string `xml:",chardata"` ID string `xml:"id,attr"` DisplayName TextLang `xml:"display-name"` URL string `xml:"url,omitempty"` }
Channel XML channel
type Config ¶
type Config struct { RedisURL string `envconfig:"REDIS_URL" default:"localhost:6379"` EpgBase string `envconfig:"EPG_BASE"` JSONTVUrl string `envconfig:"JSONTVURL" default:"https://fast-guide.smoothstreams.tv/"` Username string `envconfig:"USERNAME"` Password string `envconfig:"PASSWORD"` BaseURL string `envconfig:"BASE_URL"` RuvAPIURL string `envconfig:"RUV_API_URL" default:"http://ruv.is/sites/all/themes/at_ruv/scripts/ruv-stream.php?format=json"` RuvUseGeoblocked bool `envconfig:"RUV_USE_GEO"` Port string `envconfig:"PORT" default:"80"` }
Config All configuration that sstv logic should need
type EPG ¶
type EPG struct { XMLName xml.Name `xml:"tv"` Text string `xml:",chardata"` GeneratorInfoName string `xml:"generator-info-name,attr"` GeneratorInfoURL string `xml:"generator-info-url,attr"` Channel []Channel `xml:"channel"` Programme []Programme `xml:"programme"` }
EPG Top-level xml epg
type FakeCache ¶
type FakeCache struct { GetFunc func(string) (string, error) SetFunc func(string, string, time.Duration) error }
FakeCache to be used for testing
type Programme ¶
type Programme struct { Text string `xml:",chardata"` Start string `xml:"start,attr"` Stop string `xml:"stop,attr"` Channel string `xml:"channel,attr"` Title TextLang `xml:"title"` SubTitle *TextLang `xml:"sub-title,omitempty"` Desc *TextLang `xml:"desc,omitempty"` }
Programme XML programme
type RuntimeUtils ¶
type RuntimeUtils struct {
Cache CacheClient
}
RuntimeUtils should contain everything external
type RuvChannelResponse ¶
type RuvChannelResponse struct {
Result []string
}
RuvChannelResponse Channel response for geoblocked RUV
type SSEpg ¶
type SSEpg struct {
Channels []SSEpgChannel
}
SSEpg Intermediary type for conversion from sstv EPG to EPG
type SSEpgChannel ¶
type SSEpgChannel struct { Number string Name string Img string Events []SSEpgEvent }
SSEpgChannel A channel for SSEpg
Click to show internal directories.
Click to hide internal directories.