Documentation ¶
Index ¶
Constants ¶
View Source
const ( ScanInterval = 180 // Every 3 hours SubscriptionsInterval = 60 * 24 // Every 24 hours )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Host string `yaml:"host"` Port string `yaml:"port"` Logging struct { Level log.Level `yaml:"level"` LogToFile bool `yaml:"log_to_file"` LogToConsole bool `yaml:"log_to_console"` } `yaml:"logging"` Paths Paths `yaml:"paths"` SessionSecret *encryption.Key `yaml:"session_secret"` ScanInterval *task.Job `yaml:"scan_interval_minutes"` SubscriptionsInterval *task.Job `yaml:"subscriptions_interval_minutes"` MaxUploadedFileSizeMiB int `yaml:"max_uploaded_file_size_mib"` DebugMode bool `yaml:"debug_mode"` }
func DefaultConfig ¶
func DefaultConfig() *Config
func LoadConfig ¶
LoadConfig attempts to read Config from a filepath and returns the default Config if unsuccessful
type Paths ¶
type Paths struct { DB string // Path to the database and its files i.e. WAL file Log string // Where tanuki should log to Library string // Where tanuki stores uploaded/downloaded manga }
Paths contains directory/file Paths which tanuki uses in order to navigate to the right file
func (Paths) EnsureExist ¶
EnsureExist ensures that the required directories for the paths exist
Click to show internal directories.
Click to hide internal directories.