This commit is contained in:
2022-03-01 13:50:13 +08:00
parent 8eab9943e9
commit d2cabd7d58
113 changed files with 7925 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
package constant
const (
RedisOnlineUserKey = "online:"
)
+12
View File
@@ -0,0 +1,12 @@
package constant
const (
mysqlErrorMsg = "调用MySQL发生异常, %s"
)
type MysqlConst struct{}
// GetMysqlError Mysql异常拼接常量
func (c MysqlConst) GetMysqlError() string {
return mysqlErrorMsg
}
+25
View File
@@ -0,0 +1,25 @@
package constant
const (
redisErrorMsg = "调用Redis发生异常, %s"
redisDictKey = "dict:"
redisConfigKey = "config:"
)
// RedisConst Redis相关操作常量
type RedisConst struct{}
// GetRedisError Redis异常拼接常量
func (c RedisConst) GetRedisError() string {
return redisErrorMsg
}
// GetRedisDictKey 获取Redis的Dict的key
func (c RedisConst) GetRedisDictKey() string {
return redisDictKey
}
// GetRedisConfigKey 获取redis的config的key
func (c RedisConst) GetRedisConfigKey() string {
return redisConfigKey
}