streamserver

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Config     *ServerConfig
	ConfigPath string
)

Functions

func CachePlayer added in v0.1.0

func CachePlayer() error

func LoadPlaylist added in v0.1.0

func LoadPlaylist() error

func LoadServerConfig added in v0.1.0

func LoadServerConfig(path string) error

func LoadStreams added in v0.0.23

func LoadStreams() error

func Restart added in v0.1.0

func Restart()

func Run added in v0.1.0

func Run(configPath string)

func SavePlaylist added in v0.1.0

func SavePlaylist(p m3uprovider.PlaylistConfig) error

func SaveServerConfig added in v0.1.0

func SaveServerConfig(config ServerConfig) error

Types

type GeoIPConfig added in v0.0.25

type GeoIPConfig struct {
	Database         string   `json:"database"`
	Whitelist        []string `json:"whitelist,omitempty"`
	InternalNetworks []string `json:"internal_networks,omitempty"`
}

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 {
	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 (*ServerConfig) Merge added in v0.1.0

func (c *ServerConfig) Merge(other ServerConfig)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL