]> git.r.bdr.sh - rbdr/mobius/blob - hotline/config.go
patch: v0.10.17
[rbdr/mobius] / hotline / config.go
1 package hotline
2
3 const (
4 userIdleSeconds = 300 // time in seconds before an inactive user is marked idle
5 idleCheckInterval = 10 // time in seconds to check for idle users
6 trackerUpdateFrequency = 300 // time in seconds between tracker re-registration
7 )
8
9 type Config struct {
10 Name string `yaml:"Name" validate:"required,max=50"` // Name used for Tracker registration
11 Description string `yaml:"Description" validate:"required,max=200"` // Description used for Tracker registration
12 BannerFile string `yaml:"BannerFile"` // Path to banner jpg
13 FileRoot string `yaml:"FileRoot" validate:"required"` // Path to Files
14 EnableTrackerRegistration bool `yaml:"EnableTrackerRegistration"` // Toggle Tracker Registration
15 Trackers []string `yaml:"Trackers" validate:"dive,hostname_port"` // List of trackers that the server should register with
16 NewsDelimiter string `yaml:"NewsDelimiter"` // String used to separate news posts
17 NewsDateFormat string `yaml:"NewsDateFormat"` // Go template string to customize news date format
18 MaxDownloads int `yaml:"MaxDownloads"` // Global simultaneous download limit
19 MaxDownloadsPerClient int `yaml:"MaxDownloadsPerClient"` // Per client simultaneous download limit
20 MaxConnectionsPerIP int `yaml:"MaxConnectionsPerIP"` // Max connections per IP
21 PreserveResourceForks bool `yaml:"PreserveResourceForks"` // Enable preservation of file info and resource forks in sidecar files
22 IgnoreFiles []string `yaml:"IgnoreFiles"` // List of regular expression for filtering files from the file list
23 }