feat: webdav storage

This commit is contained in:
krau
2024-10-11 00:07:11 +08:00
parent d1d284eedc
commit b3c59fde72
8 changed files with 87 additions and 11 deletions

View File

@@ -37,8 +37,9 @@ type telegramConfig struct {
}
type storageConfig struct {
Alist alistConfig `toml:"alist" mapstructure:"alist"`
Local localConfig `toml:"local" mapstructure:"local"`
Alist alistConfig `toml:"alist" mapstructure:"alist"`
Local localConfig `toml:"local" mapstructure:"local"`
Webdav webdavConfig `toml:"webdav" mapstructure:"webdav"`
}
type alistConfig struct {
@@ -55,6 +56,14 @@ type localConfig struct {
BasePath string `toml:"base_path" mapstructure:"base_path"`
}
type webdavConfig struct {
Enable bool `toml:"enable" mapstructure:"enable"`
URL string `toml:"url" mapstructure:"url"`
Username string `toml:"username" mapstructure:"username"`
Password string `toml:"password" mapstructure:"password"`
BasePath string `toml:"base_path" mapstructure:"base_path"`
}
var Cfg *Config
func Init() {