Files
OpenList/conf/const.go

41 lines
921 B
Go
Raw Normal View History

2020-12-24 01:39:45 +08:00
package conf
import (
2021-03-04 23:50:51 +08:00
"gorm.io/gorm"
2020-12-24 01:39:45 +08:00
"net/http"
)
2021-03-05 21:25:44 +08:00
var (
Debug bool // is debug command
Help bool // is help command
Version bool // is print version command
2021-03-16 21:25:16 +08:00
ConfigFile string // config file
2021-03-05 21:25:44 +08:00
SkipUpdate bool // skip update
2021-02-27 20:06:09 +08:00
2021-03-16 23:15:37 +08:00
Client *http.Client // request client
2020-12-29 13:37:58 +08:00
2021-03-04 23:50:51 +08:00
DB *gorm.DB
2021-02-04 10:02:34 +08:00
Origins []string // allow origins
2021-09-04 19:52:56 +08:00
AllowProxies []string
2020-12-24 01:39:45 +08:00
)
var Conf = new(Config)
const (
VERSION = "v1.0.6"
2021-03-05 21:25:44 +08:00
ImageThumbnailProcess = "image/resize,w_50"
VideoThumbnailProcess = "video/snapshot,t_0,f_jpg,w_50"
ImageUrlProcess = "image/resize,w_1920/format,jpeg"
ASC = "ASC"
DESC = "DESC"
OrderUpdatedAt = "updated_at"
OrderCreatedAt = "created_at"
OrderSize = "size"
OrderName = "name"
OrderSearch = "type ASC,updated_at DESC"
AccessTokenInvalid = "AccessTokenInvalid"
Bearer = "Bearer\t"
)