Documentation
¶
Index ¶
- type APIHandler
- type ChannelsHandler
- type ConfigData
- type EPGHandler
- type GeoIPConfig
- type PlayerHandler
- type SecurityConfig
- type ServerConfig
- func (c *ServerConfig) Get() ConfigData
- func (c *ServerConfig) GetAuth() json.RawMessage
- func (c *ServerConfig) GetEpg() string
- func (c *ServerConfig) GetNumWorkers() int
- func (c *ServerConfig) GetPath() string
- func (c *ServerConfig) GetPlaylist() string
- func (c *ServerConfig) GetScanTime() int
- func (c *ServerConfig) GetSecurity() SecurityConfig
- func (c *ServerConfig) GetTimeout() int
- func (c *ServerConfig) Load(path string) error
- func (c *ServerConfig) Save() error
- func (c *ServerConfig) Set(data ConfigData)
- func (c *ServerConfig) SetAuth(auth json.RawMessage)
- func (c *ServerConfig) SetEpg(epg string)
- func (c *ServerConfig) SetNumWorkers(numWorkers int)
- func (c *ServerConfig) SetPath(path string)
- func (c *ServerConfig) SetPlaylist(playlist string)
- func (c *ServerConfig) SetScanTime(scanTime int)
- func (c *ServerConfig) SetSecurity(security SecurityConfig)
- func (c *ServerConfig) SetTimeout(timeout int)
- type StreamServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIHandler ¶ added in v0.0.25
type APIHandler struct {
// contains filtered or unexported fields
}
func NewAPIHandler ¶ added in v0.0.25
func NewAPIHandler(config *ServerConfig, restartChan *chan bool, channels *ChannelsHandler) *APIHandler
func (*APIHandler) RegisterRoutes ¶ added in v0.0.25
func (h *APIHandler) RegisterRoutes(r *mux.Router) *mux.Router
type ChannelsHandler ¶ added in v0.0.25
type ChannelsHandler struct {
// contains filtered or unexported fields
}
func NewChannelsHandler ¶ added in v0.0.25
func NewChannelsHandler(config *ServerConfig) *ChannelsHandler
func (*ChannelsHandler) GetChannel ¶ added in v0.0.25
func (p *ChannelsHandler) GetChannel(id string) *streamEntry
func (*ChannelsHandler) Load ¶ added in v0.0.25
func (p *ChannelsHandler) Load(ctx context.Context) error
func (*ChannelsHandler) RegisterRoutes ¶ added in v0.0.25
func (p *ChannelsHandler) RegisterRoutes(r *mux.Router) *mux.Router
type ConfigData ¶ added in v0.0.25
type ConfigData struct {
Port int `json:"port"`
Playlist string `json:"playlist"`
Epg string `json:"epg"`
Timeout int `json:"default_timeout,omitempty"`
NumWorkers int `json:"num_workers,omitempty"`
ScanTime int `json:"scan_time,omitempty"`
Security SecurityConfig `json:"security,omitempty"`
Auth json.RawMessage `json:"auth"`
LogFile string `json:"log_file,omitempty"`
}
func (*ConfigData) Merge ¶ added in v0.0.25
func (c *ConfigData) Merge(other ConfigData)
type EPGHandler ¶ added in v0.0.25
type EPGHandler struct {
// contains filtered or unexported fields
}
func NewEPGHandler ¶ added in v0.0.25
func NewEPGHandler(config *ServerConfig) *EPGHandler
func (*EPGHandler) RegisterRoutes ¶ added in v0.0.25
func (e *EPGHandler) RegisterRoutes(r *mux.Router) *mux.Router
type GeoIPConfig ¶ added in v0.0.25
type PlayerHandler ¶ added in v0.0.25
type PlayerHandler struct {
// contains filtered or unexported fields
}
func NewPlayerHandler ¶ added in v0.0.25
func NewPlayerHandler(config *ServerConfig) *PlayerHandler
func (*PlayerHandler) CachePlayer ¶ added in v0.0.25
func (p *PlayerHandler) CachePlayer() error
func (*PlayerHandler) RegisterRoutes ¶ added in v0.0.25
func (p *PlayerHandler) RegisterRoutes(r *mux.Router) *mux.Router
type SecurityConfig ¶ added in v0.0.25
type SecurityConfig struct {
GeoIP GeoIPConfig `json:"geoip,omitempty"`
AllowedCORSDomains []string `json:"allowed_cors_domains,omitempty"`
}
type ServerConfig ¶ added in v0.0.25
type ServerConfig struct {
// contains filtered or unexported fields
}
func NewServerConfig ¶ added in v0.0.25
func NewServerConfig(path string) *ServerConfig
func (*ServerConfig) Get ¶ added in v0.0.25
func (c *ServerConfig) Get() ConfigData
func (*ServerConfig) GetAuth ¶ added in v0.0.25
func (c *ServerConfig) GetAuth() json.RawMessage
func (*ServerConfig) GetEpg ¶ added in v0.0.25
func (c *ServerConfig) GetEpg() string
func (*ServerConfig) GetNumWorkers ¶ added in v0.0.25
func (c *ServerConfig) GetNumWorkers() int
func (*ServerConfig) GetPath ¶ added in v0.0.25
func (c *ServerConfig) GetPath() string
func (*ServerConfig) GetPlaylist ¶ added in v0.0.25
func (c *ServerConfig) GetPlaylist() string
func (*ServerConfig) GetScanTime ¶ added in v0.0.25
func (c *ServerConfig) GetScanTime() int
func (*ServerConfig) GetSecurity ¶ added in v0.0.25
func (c *ServerConfig) GetSecurity() SecurityConfig
func (*ServerConfig) GetTimeout ¶ added in v0.0.25
func (c *ServerConfig) GetTimeout() int
func (*ServerConfig) Load ¶ added in v0.0.25
func (c *ServerConfig) Load(path string) error
func (*ServerConfig) Save ¶ added in v0.0.25
func (c *ServerConfig) Save() error
func (*ServerConfig) Set ¶ added in v0.0.25
func (c *ServerConfig) Set(data ConfigData)
func (*ServerConfig) SetAuth ¶ added in v0.0.25
func (c *ServerConfig) SetAuth(auth json.RawMessage)
func (*ServerConfig) SetEpg ¶ added in v0.0.25
func (c *ServerConfig) SetEpg(epg string)
func (*ServerConfig) SetNumWorkers ¶ added in v0.0.25
func (c *ServerConfig) SetNumWorkers(numWorkers int)
func (*ServerConfig) SetPath ¶ added in v0.0.25
func (c *ServerConfig) SetPath(path string)
func (*ServerConfig) SetPlaylist ¶ added in v0.0.25
func (c *ServerConfig) SetPlaylist(playlist string)
func (*ServerConfig) SetScanTime ¶ added in v0.0.25
func (c *ServerConfig) SetScanTime(scanTime int)
func (*ServerConfig) SetSecurity ¶ added in v0.0.25
func (c *ServerConfig) SetSecurity(security SecurityConfig)
func (*ServerConfig) SetTimeout ¶ added in v0.0.25
func (c *ServerConfig) SetTimeout(timeout int)
type StreamServer ¶ added in v0.0.16
type StreamServer struct {
// contains filtered or unexported fields
}
func NewStreamServer ¶ added in v0.0.25
func NewStreamServer(configPath string) *StreamServer
Initialize the server
func (*StreamServer) Restart ¶ added in v0.0.25
func (s *StreamServer) Restart()
func (*StreamServer) Run ¶ added in v0.0.25
func (s *StreamServer) Run()
Click to show internal directories.
Click to hide internal directories.