init project

This commit is contained in:
2023-04-24 17:19:41 +08:00
parent 84729ebb66
commit cdb5a4f9cd
51 changed files with 3328 additions and 1 deletions

16
common/constant/login.go Normal file
View 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)
}

View 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前缀
)