Files
OpenList/conf/var.go

28 lines
551 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 (
TextTypes = []string{"txt", "go"}
OfficeTypes = []string{"doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf"}
VideoTypes = []string{"mp4", "mkv", "avi", "mov", "rmvb"}
AudioTypes = []string{"mp3", "flac"}
2021-10-30 00:35:29 +08:00
ImageTypes = []string{"jpg","jpeg","png","gif","bmp","svg"}
2021-10-26 22:28:37 +08:00
)