Documentation ¶
Overview ¶
*
- mysql数据库配置信息
*
- redis缓存配置信息
Index ¶
Constants ¶
View Source
const DriverName = "mysql"
View Source
const GtypeCodeDiff = 2 // 虚拟券,不同的码
View Source
const GtypeCodeSame = 1 // 虚拟券,相同的码
View Source
const GtypeGiftLarge = 4 // 实物大奖
View Source
const GtypeGiftSmall = 3 // 实物小奖
View Source
const GtypeVirtual = 0 // 虚拟币
View Source
const IpLimitMax = 500
同一个IP每天最多抽奖次数
View Source
const IpPrizeMax = 30
同一个IP每天最多抽奖次数
View Source
const RdsBlackipCacheKeyPrefix = "lottery:info_blackip_"
View Source
const RdsCodeCacheKeyPrefix = "lottery:gift_code_"
View Source
const RdsDayIpLuckyCacheKeyPrefix = "lottery:day_ips_"
View Source
const RdsDayUserLuckyCacheKeyPrefix = "lottery:day_users_"
View Source
const RdsGiftCacheKey = "lottery:allgift"
Redis Cache Key
View Source
const RdsGiftPoolCacheKey = "lottery:gift_pool"
View Source
const RdsUserCacheKeyPrefix = "lottery:info_user_"
View Source
const SysTimeform = "2006-01-02 15:04:05"
TODO - NOTICE Go语言时间格式规则
View Source
const SysTimeformShort = "2006-01-02"
View Source
const UserPrizeMax = 1
用户每天最多抽奖次数
Variables ¶
View Source
var CookieSecret = "hellolottery"
cookie中的加密验证密钥
View Source
var DbMasterList = []DbConfig{ { Host: "192.168.174.134", Port: 3306, User: "root", Pwd: "root", Database: "lottery", IsRunning: true, }, }
系统中所有mysql主库 root:root@tcp(127.0.0.1:3306)/lottery?charset=utf8
View Source
var PrizeDataRandomDayTime = [100]int{
0, 0, 0,
1, 1, 1,
2, 2, 2,
3, 3, 3,
4, 4, 4,
5, 5, 5,
6, 6, 6,
7, 7, 7,
8, 8, 8,
9, 9, 9, 9, 9, 9, 9,
10, 10, 10, 10, 10, 10, 10,
11, 11, 11,
12, 12, 12,
13, 13, 13,
14, 14, 14,
15, 15, 15, 15, 15, 15, 15,
16, 16, 16, 16, 16, 16, 16,
17, 17, 17, 17, 17, 17, 17,
18, 18, 18,
19, 19, 19,
20, 20, 20, 20, 20, 20, 20,
21, 21, 21, 21, 21, 21, 21,
22, 22, 22,
23, 23, 23,
}
定义1天24小时奖品分配100%权重
View Source
var RdsCacheList = []RdsConfig{ { Host: "192.168.174.134", Port: 6379, User: "", Pwd: "", IsRunning: true, }, }
系统中用到的所有redis缓存资源
View Source
var RunningCrontabService = true
是否需要启动全局计划任务服务
View Source
var SignSecret = []byte("0123456789abcdef")
TODO - WARN 部署时根据实际情况更改该项 ObjSalesign 签名密钥
View Source
var SysTimeLocation, _ = time.LoadLocation("Asia/Chongqing")
中国时区
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.