🏗️ microservice fabric splitting
This commit is contained in:
10
common/constant/comment_type.go
Normal file
10
common/constant/comment_type.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package constant
|
||||
|
||||
const (
|
||||
COMMENT int64 = iota
|
||||
REPLY
|
||||
)
|
||||
|
||||
const (
|
||||
CommentTopicType int64 = iota
|
||||
)
|
6
common/constant/gender.go
Normal file
6
common/constant/gender.go
Normal file
@@ -0,0 +1,6 @@
|
||||
package constant
|
||||
|
||||
const (
|
||||
Female int64 = iota
|
||||
Male
|
||||
)
|
6
common/constant/jwt_type.go
Normal file
6
common/constant/jwt_type.go
Normal file
@@ -0,0 +1,6 @@
|
||||
package constant
|
||||
|
||||
const (
|
||||
JWT_TYPE_ACCESS string = "access"
|
||||
JWT_TYPE_REFRESH string = "refresh"
|
||||
)
|
5
common/constant/mongodb.go
Normal file
5
common/constant/mongodb.go
Normal file
@@ -0,0 +1,5 @@
|
||||
package constant
|
||||
|
||||
const (
|
||||
COMMENT_IMAGES = "comment_images"
|
||||
)
|
8
common/constant/oauth_type.go
Normal file
8
common/constant/oauth_type.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package constant
|
||||
|
||||
const (
|
||||
OAuthSourceWechat = "wechat"
|
||||
OAuthSourceQQ = "qq"
|
||||
OAuthSourceGithub = "github"
|
||||
OAuthSourceGitee = "gitee"
|
||||
)
|
15
common/constant/redis_prefix.go
Normal file
15
common/constant/redis_prefix.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package constant
|
||||
|
||||
// 用户相关的redis key
|
||||
const (
|
||||
UserClientPrefix string = "user:client:"
|
||||
UserCaptchaPrefix string = "user:captcha:"
|
||||
UserTokenPrefix string = "user:token:"
|
||||
UserSmsRedisPrefix string = "user:sms:"
|
||||
UserQrcodePrefix = "user:qrcode:"
|
||||
)
|
||||
|
||||
// 系统相关的redis key
|
||||
const (
|
||||
SystemApiNoncePrefix = "system:nonce:"
|
||||
)
|
3
common/constant/time.go
Normal file
3
common/constant/time.go
Normal file
@@ -0,0 +1,3 @@
|
||||
package constant
|
||||
|
||||
const TimeFormat = "2006-01-02 15:04:05"
|
3
common/constant/uid_key.go
Normal file
3
common/constant/uid_key.go
Normal file
@@ -0,0 +1,3 @@
|
||||
package constant
|
||||
|
||||
const UID_HEADER_KEY = "X-UID"
|
7
common/constant/user_role.go
Normal file
7
common/constant/user_role.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package constant
|
||||
|
||||
const (
|
||||
Root string = "root"
|
||||
Admin string = "admin"
|
||||
User string = "user"
|
||||
)
|
Reference in New Issue
Block a user