Files
OpenList/conf/var.go

28 lines
570 B
Go
Raw Normal View History

2021-10-25 18:53:59 +08:00
package conf
2021-10-27 18:59:03 +08:00
import (
"context"
"github.com/eko/gocache/v2/cache"
2021-10-27 22:45:36 +08:00
"github.com/robfig/cron/v3"
2021-10-27 18:59:03 +08:00
"gorm.io/gorm"
)
2021-10-25 18:53:59 +08:00
var (
ConfigFile string // config file
2021-10-26 22:28:37 +08:00
Conf *Config
Debug bool
2021-10-25 18:53:59 +08:00
DB *gorm.DB
2021-10-27 18:59:03 +08:00
Cache *cache.Cache
Ctx = context.TODO()
2021-10-27 22:45:36 +08:00
Cron *cron.Cron
2021-10-26 22:28:37 +08:00
)
var (
2021-10-30 17:34:34 +08:00
TextTypes = []string{"txt", "go", "md"}
2021-10-26 22:28:37 +08:00
OfficeTypes = []string{"doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf"}
VideoTypes = []string{"mp4", "mkv", "avi", "mov", "rmvb"}
2021-10-30 17:34:34 +08:00
AudioTypes = []string{"mp3", "flac","ogg"}
2021-10-30 19:26:23 +08:00
ImageTypes = []string{"jpg","tiff","jpeg","png","gif","bmp","svg"}
2021-10-26 22:28:37 +08:00
)