2024-07-19 19:04:11 +08:00
|
|
|
package constant
|
|
|
|
|
2024-12-03 10:12:02 +08:00
|
|
|
import "sync/atomic"
|
|
|
|
|
2024-07-19 19:04:11 +08:00
|
|
|
type DBContext string
|
|
|
|
|
|
|
|
const (
|
|
|
|
TimeOut5s = 5
|
|
|
|
TimeOut20s = 20
|
|
|
|
TimeOut5m = 300
|
|
|
|
|
|
|
|
DateLayout = "2006-01-02" // or use time.DateOnly while go version >= 1.20
|
|
|
|
DefaultDate = "1970-01-01"
|
|
|
|
DateTimeLayout = "2006-01-02 15:04:05" // or use time.DateTime while go version >= 1.20
|
|
|
|
DateTimeSlimLayout = "20060102150405"
|
|
|
|
|
|
|
|
OrderDesc = "descending"
|
|
|
|
OrderAsc = "ascending"
|
|
|
|
|
2024-08-08 15:38:37 +08:00
|
|
|
// backup
|
2024-11-12 13:35:12 +08:00
|
|
|
S3 = "S3"
|
|
|
|
OSS = "OSS"
|
|
|
|
Sftp = "SFTP"
|
|
|
|
OneDrive = "OneDrive"
|
|
|
|
MinIo = "MINIO"
|
|
|
|
Cos = "COS"
|
|
|
|
Kodo = "KODO"
|
|
|
|
WebDAV = "WebDAV"
|
|
|
|
Local = "LOCAL"
|
|
|
|
UPYUN = "UPYUN"
|
|
|
|
ALIYUN = "ALIYUN"
|
|
|
|
GoogleDrive = "GoogleDrive"
|
|
|
|
|
2024-08-08 15:38:37 +08:00
|
|
|
OneDriveRedirectURI = "http://localhost/login/authorized"
|
2024-11-12 13:35:12 +08:00
|
|
|
GoogleRedirectURI = "http://localhost:8080"
|
2024-07-19 19:04:11 +08:00
|
|
|
)
|
2024-12-03 10:12:02 +08:00
|
|
|
|
2024-12-20 16:08:34 +08:00
|
|
|
const (
|
|
|
|
DirPerm = 0755
|
|
|
|
FilePerm = 0644
|
|
|
|
)
|
|
|
|
|
2024-12-03 10:12:02 +08:00
|
|
|
var CertStore atomic.Value
|