Support downloading resources from CDN server

Signed-off-by: Yuan Si <do4suki@gmail.com>
This commit is contained in:
2023-04-10 05:35:13 +08:00
parent 8a69a9391b
commit 0fcb44dbd4
10 changed files with 464 additions and 10 deletions
+8
View File
@@ -18,6 +18,7 @@ type AppConfigs struct {
Server ServerConfigs `yaml:"server"`
Log LogConfigs `yaml:"log"`
LevelDb LevelDbConfigs `yaml:"leveldb"`
Cdn CdnConfigs `yaml:"cdn"`
}
type ServerConfigs struct {
@@ -37,6 +38,10 @@ type LevelDbConfigs struct {
DataPath string `yaml:"data_path"`
}
type CdnConfigs struct {
CdnUrl string `yaml:"cdn_url"`
}
func DefaultConfigs() *AppConfigs {
return &AppConfigs{
AppName: "LL! SIF Private Server",
@@ -54,6 +59,9 @@ func DefaultConfigs() *AppConfigs {
LevelDb: LevelDbConfigs{
DataPath: "./data/honoka-chan.db",
},
Cdn: CdnConfigs{
CdnUrl: "",
},
}
}