✨ init project
This commit is contained in:
16
common/constant/login.go
Normal file
16
common/constant/login.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package constant
|
||||
|
||||
// LoginType 自定义登录类型
|
||||
type LoginType string
|
||||
|
||||
// 登录类型
|
||||
const (
|
||||
LoginTypeWeChatMiniApp LoginType = "wechat_mini_app" // 微信小程序登录
|
||||
LoginTypeSms LoginType = "sms" // 短信验证码登录
|
||||
LoginTypePassword LoginType = "password" // 密码登录
|
||||
)
|
||||
|
||||
// String 转换为字符串
|
||||
func (t LoginType) String() string {
|
||||
return string(t)
|
||||
}
|
11
common/constant/rds_key.go
Normal file
11
common/constant/rds_key.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package constant
|
||||
|
||||
const (
|
||||
RdsCaptchaPrefix = "captcha:img:" // 验证码缓存前缀
|
||||
RdsSmsCaptchaPrefix = "captcha:sms:" // 短信验证码缓存前缀
|
||||
OAuth2RedisKey = "oauth:token:" // Token缓存前缀
|
||||
OAuth2UserCacheKey = "oauth:user:" // 用户缓存前缀
|
||||
ApiAntiShakeKey = "api:antishake:" // 防抖锁
|
||||
ReportGenTaskKey = "report:gen:task" // 任务生成计划待办队列
|
||||
WeChatSessionKey = "wechat:session:" // 小程序用户SessionKey前缀
|
||||
)
|
Reference in New Issue
Block a user