Documentation ¶
Index ¶
- Variables
- func Init(build *BuildVars) error
- func InitRuntime() error
- type BuildVars
- type Configuration
- type DatabaseConfiguration
- type MessagePatternType
- type PvrConfig
- type PvrFilters
- type PvrInstance
- type ReleaseInfo
- type RuntimeConfig
- type ServerConfig
- type TrackerBencodeConfig
- type TrackerConfig
- type TrackerIgnore
- type TrackerInfo
- type TrackerInstance
- type TrackerIrcConfig
- type TrackerPattern
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Config exports the config object Config *Configuration // Runtime flags/config Runtime *RuntimeConfig RuntimeViper = viper.New() // ldflags (set by makefile or goreleaser) Build *BuildVars // State Pvr = make(map[string]*PvrInstance) )
Functions ¶
func InitRuntime ¶
func InitRuntime() error
Types ¶
type BuildVars ¶
type BuildVars struct { // Version Version string // Timestamp Timestamp string // Git commit GitCommit string }
BuildVars build details
type Configuration ¶
type Configuration struct { Database DatabaseConfiguration Server ServerConfig Pvr []PvrConfig Trackers map[string]TrackerConfig }
func (Configuration) ToJsonString ¶
func (cfg Configuration) ToJsonString() (string, error)
type DatabaseConfiguration ¶
type DatabaseConfiguration struct {
MaxAgeHours int
}
type MessagePatternType ¶
type MessagePatternType int
const ( LinePattern MessagePatternType = iota + 1 MultiLinePattern )
type PvrConfig ¶
type PvrConfig struct { Name string Enabled bool URL string ApiKey string Filters *PvrFilters }
type PvrFilters ¶
type PvrInstance ¶
type ReleaseInfo ¶
type RuntimeConfig ¶
type ServerConfig ¶
type TrackerBencodeConfig ¶
type TrackerConfig ¶
type TrackerConfig struct { Enabled bool Bencode *TrackerBencodeConfig Settings map[string]string IRC *TrackerIrcConfig }
type TrackerIgnore ¶
type TrackerInfo ¶
type TrackerInfo struct { Name string ShortName *string LongName string Settings []string Servers []string Channels []string Announcers []string IgnoreLines []TrackerIgnore LinePatterns []TrackerPattern MultiLinePatterns []TrackerPattern LineMatchedRules *xmlquery.Node }
type TrackerInstance ¶
type TrackerInstance struct { Name string Config *TrackerConfig Info *TrackerInfo IRC *irc.Connection }
type TrackerIrcConfig ¶
type TrackerPattern ¶
type TrackerPattern struct { PatternType MessagePatternType Rxp *regexp.Regexp Vars []string Optional bool }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.