Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GlobalApiRateLimitNum = env.Int("GLOBAL_API_RATE_LIMIT", 240) GlobalApiRateLimitDuration int64 = 3 * 60 GlobalWebRateLimitNum = env.Int("GLOBAL_WEB_RATE_LIMIT", 120) GlobalWebRateLimitDuration int64 = 3 * 60 UploadRateLimitNum = 10 UploadRateLimitDuration int64 = 60 DownloadRateLimitNum = 10 DownloadRateLimitDuration int64 = 60 CriticalRateLimitNum = 20 CriticalRateLimitDuration int64 = 20 * 60 )
All duration's unit is seconds Shouldn't larger then RateLimitKeyExpirationDuration
View Source
var ApproximateTokenEnabled = false
View Source
var AutomaticDisableChannelEnabled = false
View Source
var AutomaticEnableChannelEnabled = false
View Source
var BatchUpdateEnabled = false
View Source
var BatchUpdateInterval = env.Int("BATCH_UPDATE_INTERVAL", 5)
View Source
var ChannelDisableThreshold = 5.0
View Source
var ChatLink = ""
View Source
var DebugEnabled = strings.ToLower(os.Getenv("DEBUG")) == "true"
View Source
var DebugSQLEnabled = strings.ToLower(os.Getenv("DEBUG_SQL")) == "true"
View Source
var DisplayInCurrencyEnabled = true
View Source
var DisplayTokenStatEnabled = true
View Source
var EmailDomainRestrictionEnabled = false
View Source
var EmailDomainWhitelist = []string{
"gmail.com",
"163.com",
"126.com",
"qq.com",
"outlook.com",
"hotmail.com",
"icloud.com",
"yahoo.com",
"foxmail.com",
}
View Source
var EmailVerificationEnabled = false
View Source
var EnableMetric = env.Bool("ENABLE_METRIC", false)
View Source
var GeminiSafetySetting = env.String("GEMINI_SAFETY_SETTING", "BLOCK_NONE")
View Source
var GeminiVersion = env.String("GEMINI_VERSION", "v1")
View Source
var GitHubClientId = ""
View Source
var GitHubClientSecret = ""
View Source
var GitHubOAuthEnabled = false
View Source
var InitialRootAccessToken = os.Getenv("INITIAL_ROOT_ACCESS_TOKEN")
View Source
var InitialRootToken = os.Getenv("INITIAL_ROOT_TOKEN")
View Source
var IsMasterNode = os.Getenv("NODE_TYPE") != "slave"
View Source
var ItemsPerPage = 10
View Source
var LarkClientId = ""
View Source
var LarkClientSecret = ""
View Source
var LogConsumeEnabled = true
View Source
var Logo = ""
View Source
var MaxRecentItems = 100
View Source
var MemoryCacheEnabled = strings.ToLower(os.Getenv("MEMORY_CACHE_ENABLED")) == "true"
View Source
var MessagePusherAddress = ""
View Source
var MessagePusherToken = ""
View Source
var MetricFailChanSize = env.Int("METRIC_FAIL_CHAN_SIZE", 128)
View Source
var MetricQueueSize = env.Int("METRIC_QUEUE_SIZE", 10)
View Source
var MetricSuccessChanSize = env.Int("METRIC_SUCCESS_CHAN_SIZE", 1024)
View Source
var MetricSuccessRateThreshold = env.Float64("METRIC_SUCCESS_RATE_THRESHOLD", 0.8)
View Source
var OnlyOneLogFile = env.Bool("ONLY_ONE_LOG_FILE", false)
View Source
var OptionMap map[string]string
View Source
var OptionMapRWMutex sync.RWMutex
View Source
var PasswordLoginEnabled = true
View Source
var PasswordRegisterEnabled = true
View Source
var PreConsumedQuota int64 = 500
View Source
var QuotaForInvitee int64 = 0
View Source
var QuotaForInviter int64 = 0
View Source
var QuotaForNewUser int64 = 0
View Source
var QuotaPerUnit = 500 * 1000.0 // $0.002 / 1K tokens
View Source
var QuotaRemindThreshold int64 = 1000
View Source
var RateLimitKeyExpirationDuration = 20 * time.Minute
View Source
var RegisterEnabled = true
View Source
var RelayProxy = env.String("RELAY_PROXY", "")
View Source
var RelayTimeout = env.Int("RELAY_TIMEOUT", 0) // unit is second
View Source
var RequestInterval = time.Duration(requestInterval) * time.Second
View Source
var RetryTimes = 0
View Source
var RootUserEmail = ""
View Source
var SMTPAccount = ""
View Source
var SMTPFrom = ""
View Source
var SMTPPort = 587
View Source
var SMTPServer = ""
View Source
var SMTPToken = ""
View Source
var ServerAddress = "http://localhost:3000"
View Source
var SessionSecret = uuid.New().String()
View Source
var SyncFrequency = env.Int("SYNC_FREQUENCY", 10*60) // unit is second
View Source
var SystemName = "One API"
View Source
var Theme = env.String("THEME", "default")
View Source
var TopUpLink = ""
View Source
var TurnstileCheckEnabled = false
View Source
var TurnstileSecretKey = ""
View Source
var TurnstileSiteKey = ""
View Source
var UserContentRequestProxy = env.String("USER_CONTENT_REQUEST_PROXY", "")
View Source
var UserContentRequestTimeout = env.Int("USER_CONTENT_REQUEST_TIMEOUT", 30)
View Source
var WeChatAccountQRCodeImageURL = ""
View Source
var WeChatAuthEnabled = false
View Source
var WeChatServerAddress = ""
View Source
var WeChatServerToken = ""
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.