Test: thumbnail and authn / Modify: read thumbnail config from file

This commit is contained in:
HFO4
2019-12-09 11:33:39 +08:00
parent f35c585edf
commit c3c0e92964
13 changed files with 491 additions and 98 deletions

41
pkg/conf/defaults.go Normal file
View File

@@ -0,0 +1,41 @@
package conf
import "github.com/mojocn/base64Captcha"
// RedisConfig Redis服务器配置
var RedisConfig = &redis{
Server: "",
Password: "",
DB: "0",
}
// DatabaseConfig 数据库配置
var DatabaseConfig = &database{
Type: "UNSET",
}
// SystemConfig 系统公用配置
var SystemConfig = &system{
Debug: false,
}
// CaptchaConfig 验证码配置
var CaptchaConfig = &captcha{
Height: 60,
Width: 240,
Mode: 3,
ComplexOfNoiseText: base64Captcha.CaptchaComplexLower,
ComplexOfNoiseDot: base64Captcha.CaptchaComplexLower,
IsShowHollowLine: false,
IsShowNoiseDot: false,
IsShowNoiseText: false,
IsShowSlimeLine: false,
IsShowSineLine: false,
CaptchaLen: 6,
}
var ThumbConfig = &thumb{
MaxWidth: 400,
MaxHeight: 300,
FileSuffix: "._thumb",
}