mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-03-30 10:16:52 +00:00
16 lines
486 B
Go
16 lines
486 B
Go
package service
|
|
|
|
import "strconv"
|
|
|
|
// OpenAITokenCacheKey 生成 OpenAI OAuth 账号的缓存键
|
|
// 格式: "openai:account:{account_id}"
|
|
func OpenAITokenCacheKey(account *Account) string {
|
|
return "openai:account:" + strconv.FormatInt(account.ID, 10)
|
|
}
|
|
|
|
// ClaudeTokenCacheKey 生成 Claude (Anthropic) OAuth 账号的缓存键
|
|
// 格式: "claude:account:{account_id}"
|
|
func ClaudeTokenCacheKey(account *Account) string {
|
|
return "claude:account:" + strconv.FormatInt(account.ID, 10)
|
|
}
|