| 1 | export class ServerRedisKeys { |
| 2 | static rateLimit(key: string): string { |
| 3 | return `rate_limit:${key}` |
| 4 | } |
| 5 | |
| 6 | static shortLink(code: string): string { |
| 7 | return `server:shortLink:${code}` |
| 8 | } |
| 9 | |
| 10 | static channelCredential(accountId: string): string { |
| 11 | return `channels:credential:${accountId}` |
| 12 | } |
| 13 | |
| 14 | static channelCredentialLock(accountId: string): string { |
| 15 | return `channels:credential:lock:${accountId}` |
| 16 | } |
| 17 | |
| 18 | static channelAuthSession(sessionId: string): string { |
| 19 | return `channels:auth:session:${sessionId}` |
| 20 | } |
| 21 | |
| 22 | static legacyChannelAuthTask(platform: string, id: string): string { |
| 23 | return `${platform}:auth_task:${id}` |
| 24 | } |
| 25 | |
| 26 | static legacyChannelAccessToken(platform: string, id: string): string { |
| 27 | return `${platform}:access_token:${id}` |
| 28 | } |
| 29 | |
| 30 | static legacyChannelCamelAccessToken(platform: string, id: string): string { |
| 31 | return `${platform}:accessToken:${id}` |
| 32 | } |
| 33 | |
| 34 | static legacyChannelPageAccessToken(platform: string, pageId: string): string { |
| 35 | return `${platform}:page:access_token:${pageId}` |
| 36 | } |
| 37 | |
| 38 | static legacyChannelUserPageList(platform: string, accountId: string): string { |
| 39 | return `${platform}:user_page_list:${accountId}` |
| 40 | } |
| 41 | |
| 42 | static douyinClientToken(): string { |
| 43 | return 'douyin:client_token' |
| 44 | } |
| 45 | |
| 46 | static douyinOpenTicket(): string { |
| 47 | return 'douyin:open_ticket' |
| 48 | } |
| 49 | } |
| 50 |