feat: Add More Multi Login Policy (#2770)

* feat: multiLogin

* feat: change config
This commit is contained in:
icey-yu
2024-10-24 15:02:44 +08:00
committed by GitHub
parent a2110e416a
commit 9e8a389698
11 changed files with 375 additions and 98 deletions
+2
View File
@@ -9,6 +9,8 @@ type TokenModel interface {
// SetTokenFlagEx set token and flag with expire time
SetTokenFlagEx(ctx context.Context, userID string, platformID int, token string, flag int) error
GetTokensWithoutError(ctx context.Context, userID string, platformID int) (map[string]int, error)
GetAllTokensWithoutError(ctx context.Context, userID string) (map[int]map[string]int, error)
SetTokenMapByUidPid(ctx context.Context, userID string, platformID int, m map[string]int) error
BatchSetTokenMapByUidPid(ctx context.Context, tokens map[string]map[string]int) error
DeleteTokenByUidPid(ctx context.Context, userID string, platformID int, fields []string) error
}