2025-06-25 15:25:18 +08:00
|
|
|
package consts
|
|
|
|
|
|
2025-07-04 10:56:03 +08:00
|
|
|
const (
|
2025-07-17 16:45:27 +08:00
|
|
|
UserActiveKeyFmt = "user:active:%s"
|
|
|
|
|
AdminActiveKeyFmt = "admin:active:%s"
|
2025-07-04 10:56:03 +08:00
|
|
|
)
|
|
|
|
|
|
2025-06-25 15:25:18 +08:00
|
|
|
type UserStatus string
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
UserStatusActive UserStatus = "active"
|
|
|
|
|
UserStatusInactive UserStatus = "inactive"
|
|
|
|
|
UserStatusLocked UserStatus = "locked"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const (
|
2025-07-21 11:53:26 +08:00
|
|
|
SessionName = "monkeycode_session"
|
|
|
|
|
UserSessionName = "monkeycode_user_session"
|
2025-06-25 15:25:18 +08:00
|
|
|
)
|
2025-07-01 21:08:30 +08:00
|
|
|
|
|
|
|
|
type UserPlatform string
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
UserPlatformEmail UserPlatform = "email"
|
|
|
|
|
UserPlatformDingTalk UserPlatform = "dingtalk"
|
2025-07-09 18:13:15 +08:00
|
|
|
UserPlatformCustom UserPlatform = "custom"
|
2025-07-01 21:08:30 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type OAuthKind string
|
|
|
|
|
|
|
|
|
|
const (
|
2025-07-09 18:13:15 +08:00
|
|
|
OAuthKindInvite OAuthKind = "invite"
|
|
|
|
|
OAuthKindLogin OAuthKind = "login"
|
2025-07-01 21:08:30 +08:00
|
|
|
)
|
2025-07-09 18:47:44 +08:00
|
|
|
|
|
|
|
|
type InviteCodeStatus string
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
InviteCodeStatusPending InviteCodeStatus = "pending"
|
|
|
|
|
InviteCodeStatusUsed InviteCodeStatus = "used"
|
|
|
|
|
)
|
2025-07-21 11:53:26 +08:00
|
|
|
|
|
|
|
|
type LoginSource string
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
LoginSourcePlugin LoginSource = "plugin"
|
|
|
|
|
LoginSourceBrowser LoginSource = "browser"
|
|
|
|
|
)
|