oprimized, working

This commit is contained in:
royalcat 2023-12-22 02:15:39 +03:00
parent 2b39afca3b
commit 0350ecba9a
38 changed files with 1809 additions and 826 deletions

View file

@ -20,6 +20,10 @@ var defaultConfig = Config{
Fuse: Fuse{
Enabled: false,
},
NFS: NFS{
Enabled: false,
Port: 8122,
},
},
TorrentClient: TorrentClient{

View file

@ -42,7 +42,10 @@ func Load(path string) (*Config, error) {
}
conf := Config{}
k.Unmarshal("", &conf)
err = k.Unmarshal("", &conf)
if err != nil {
return nil, err
}
return &conf, nil
}

View file

@ -61,6 +61,12 @@ type Mounts struct {
WebDAV WebDAV `koanf:"webdav"`
HttpFs HttpFs `koanf:"httpfs"`
Fuse Fuse `koanf:"fuse"`
NFS NFS `koanf:"nfs"`
}
type NFS struct {
Enabled bool `koanf:"enabled"`
Port int `koanf:"port"`
}
type HttpFs struct {