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 TrackerIrcSaslConfig
- 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 PvrFilters ¶
type PvrInstance ¶
type PvrInstance struct {
Config *PvrConfig
IgnoresExpr []*vm.Program
AcceptsExpr []*vm.Program
DelaysExpr []*vm.Program
HasFileExpressions bool
}
func (*PvrInstance) ShouldAccept ¶ added in v1.5.0
func (p *PvrInstance) ShouldAccept(r *ReleaseInfo, log *logrus.Entry) (bool, error)
func (*PvrInstance) ShouldDelay ¶ added in v1.5.0
func (p *PvrInstance) ShouldDelay(r *ReleaseInfo, log *logrus.Entry) (*int64, error)
func (*PvrInstance) ShouldIgnore ¶ added in v1.5.0
func (p *PvrInstance) ShouldIgnore(r *ReleaseInfo, log *logrus.Entry) (bool, error)
type ReleaseInfo ¶
type RuntimeConfig ¶
type ServerConfig ¶
type TrackerBencodeConfig ¶
type TrackerConfig ¶
type TrackerConfig struct {
Enabled bool
ForceHTTP 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 TrackerIrcSaslConfig ¶ added in v1.7.0
type TrackerPattern ¶
type TrackerPattern struct {
PatternType MessagePatternType
Rxp *regexp.Regexp
Vars []string
Optional bool
}
Click to show internal directories.
Click to hide internal directories.