config

package
v0.0.0-...-ba3f146 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2020 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   string
	GitCommit string
	BuildDate string
	GoVersion string
	Platform  string
)

all these are set at compile time

Functions

func EpgGeneratorName

func EpgGeneratorName() string

func EpgGeneratorUrl

func EpgGeneratorUrl() string

func ShowVersion

func ShowVersion()

Types

type Canonicalise

type Canonicalise struct {
	Enable         bool
	DefaultCountry string `yaml:"default_country"`
}

type CheckStreams

type CheckStreams struct {
	Enabled bool
	Method  string
	Action  CheckStreamsAction
}

func (*CheckStreams) UnmarshalYAML

func (c *CheckStreams) UnmarshalYAML(unmarshal func(interface{}) error) (err error)

type CheckStreamsAction

type CheckStreamsAction string
const (
	InvalidStreamRemove CheckStreamsAction = "remove"
	InvalidStreamNoop                      = "noop"
)

type Config

type Config struct {
	Core         *Core
	Providers    []*Provider
	EpgProviders []*EpgProvider `yaml:"epg_providers"`
	// contains filtered or unexported fields
}

func New

func New(filepath string) (*Config, error)

func (*Config) GetGroupOrder

func (c *Config) GetGroupOrder() map[string]int

func (*Config) Load

func (c *Config) Load() error

type Core

type Core struct {
	ServerListen         string `yaml:"server_listen"`
	AutoReloadConfig     bool   `yaml:"auto_reload_config"`
	Output               string
	UpdateSchedule       string       `yaml:"update_schedule"`
	Canonicalise         Canonicalise `yaml:"canonicalise"`
	GroupOrder           []string     `yaml:"group_order"`
	PrettyOutputXml      bool
	HttpTimeout          uint8 `yaml:"http_timeout"` // in seconds
	HttpMaxRetryAttempts int   `yaml:"http_max_retry_attempts"`
	// contains filtered or unexported fields
}

type EpgProvider

type EpgProvider struct {
	Uri              string
	ChannelIdRenames map[string]string `yaml:"channel_id_renames"` // key = new_id, value = old_id
}

type Provider

type Provider struct {
	Uri               string
	IgnoreParseErrors bool         `yaml:"ignore_parse_errors"`
	CheckStreams      CheckStreams `yaml:"check_streams"`
	Filters           []string
	Setters           []*Setter
}

type Setter

type Setter struct {
	ChNo  string `yaml:"chno"`
	Name  string
	Id    string
	Group string
	Shift string

	Filters []string
}

Jump to

Keyboard shortcuts

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