Remove previous POCs
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
This commit is contained in:
parent
401a79379f
commit
b8392c4c50
50 changed files with 0 additions and 1958 deletions
config
29
config/model.go
Normal file
29
config/model.go
Normal file
|
@ -0,0 +1,29 @@
|
|||
package config
|
||||
|
||||
// Root is the main yaml config object
|
||||
type Root struct {
|
||||
MaxCacheSize int64 `yaml:"max-cache-size,omitempty"`
|
||||
MetadataFolder string `yaml:"metadata-folder-name,omitempty"`
|
||||
|
||||
MountPoints []*MountPoint `yaml:"mountPoints"`
|
||||
}
|
||||
|
||||
type MountPoint struct {
|
||||
Path string `yaml:"path"`
|
||||
Torrents []struct {
|
||||
MagnetURI string `yaml:"magnetUri"`
|
||||
TorrentPath string `yaml:"torrentPath"`
|
||||
FolderName string `yaml:"folderName,omitempty"`
|
||||
} `yaml:"torrents"`
|
||||
}
|
||||
|
||||
func AddDefaults(r *Root) *Root {
|
||||
if r.MaxCacheSize == 0 {
|
||||
r.MaxCacheSize = 1024 // 1GB
|
||||
}
|
||||
if r.MetadataFolder == "" {
|
||||
r.MetadataFolder = "./metadata"
|
||||
}
|
||||
|
||||
return r
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue