2021-10-25 10:53:59 +00:00
|
|
|
package conf
|
|
|
|
|
2021-10-27 10:59:03 +00:00
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"github.com/eko/gocache/v2/cache"
|
|
|
|
"gorm.io/gorm"
|
|
|
|
)
|
2021-10-25 10:53:59 +00:00
|
|
|
|
|
|
|
var (
|
|
|
|
ConfigFile string // config file
|
2021-10-26 14:28:37 +00:00
|
|
|
Conf *Config
|
|
|
|
Debug bool
|
2021-10-25 10:53:59 +00:00
|
|
|
|
|
|
|
DB *gorm.DB
|
2021-10-27 10:59:03 +00:00
|
|
|
Cache *cache.Cache
|
|
|
|
Ctx = context.TODO()
|
2021-10-26 14:28:37 +00: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"}
|
|
|
|
)
|