Files
OpenList/conf/config.go

43 lines
1.7 KiB
Go
Raw Normal View History

2020-12-24 01:39:45 +08:00
package conf
type Config struct {
2020-12-24 15:21:49 +08:00
Info struct{
Title string `yaml:"title" json:"title"`
SiteUrl string `yaml:"site_url" json:"site_url"`//网站url
2020-12-28 11:22:54 +08:00
BackendUrl string `yaml:"backend_url" json:"backend_url"`//后端地址
2020-12-24 15:21:49 +08:00
Logo string `yaml:"logo" json:"logo"`
2020-12-28 11:22:54 +08:00
FooterText string `yaml:"footer_text" json:"footer_text"`
FooterUrl string `yaml:"footer_url" json:"footer_url"`
MusicImg string `yaml:"music_img" json:"music_img"`
2020-12-31 16:15:15 +08:00
CheckUpdate bool `yaml:"check_update" json:"check_update"`
2020-12-31 17:08:54 +08:00
Script string `yaml:"script" json:"script"`
Autoplay bool `yaml:"autoplay" json:"autoplay"`
Preview struct{
Url string `yaml:"url" json:"url"`
PreProcess []string `yaml:"pre_process" json:"pre_process"`
Extensions []string `yaml:"extensions" json:"extensions"`
Text []string `yaml:"text" json:"text"`
MaxSize int `yaml:"max_size" json:"max_size"`
} `yaml:"preview" json:"preview"`
2020-12-24 15:21:49 +08:00
} `yaml:"info"`
2020-12-24 01:39:45 +08:00
Server struct{
Port string `yaml:"port"`//端口
2020-12-24 15:21:49 +08:00
Search bool `yaml:"search" json:"search"`//允许搜索
Static string `yaml:"static"`
2020-12-24 01:39:45 +08:00
} `yaml:"server"`
2020-12-29 13:37:58 +08:00
Cache struct{
2020-12-29 13:54:08 +08:00
Enable bool `yaml:"enable"`
2020-12-29 13:37:58 +08:00
Expiration int `yaml:"expiration"`
CleanupInterval int `yaml:"cleanup_interval"`
RefreshPassword string `yaml:"refresh_password"`
}
2020-12-24 01:39:45 +08:00
AliDrive struct{
ApiUrl string `yaml:"api_url"`//阿里云盘api
RootFolder string `yaml:"root_folder"`//根目录id
//Authorization string `yaml:"authorization"`//授权token
LoginToken string `yaml:"login_token"`
AccessToken string `yaml:"access_token"`
RefreshToken string `yaml:"refresh_token"`
MaxFilesCount int `yaml:"max_files_count"`
} `yaml:"ali_drive"`
}