2025-12-26 15:40:24 +08:00
|
|
|
|
package service
|
|
|
|
|
|
|
|
|
|
|
|
type SystemSettings struct {
|
|
|
|
|
|
RegistrationEnabled bool
|
|
|
|
|
|
EmailVerifyEnabled bool
|
|
|
|
|
|
|
2026-01-04 21:06:12 +08:00
|
|
|
|
SMTPHost string
|
|
|
|
|
|
SMTPPort int
|
|
|
|
|
|
SMTPUsername string
|
|
|
|
|
|
SMTPPassword string
|
|
|
|
|
|
SMTPPasswordConfigured bool
|
|
|
|
|
|
SMTPFrom string
|
|
|
|
|
|
SMTPFromName string
|
|
|
|
|
|
SMTPUseTLS bool
|
2025-12-26 15:40:24 +08:00
|
|
|
|
|
2026-01-04 21:06:12 +08:00
|
|
|
|
TurnstileEnabled bool
|
|
|
|
|
|
TurnstileSiteKey string
|
|
|
|
|
|
TurnstileSecretKey string
|
2026-01-02 17:40:57 +08:00
|
|
|
|
TurnstileSecretKeyConfigured bool
|
2025-12-26 15:40:24 +08:00
|
|
|
|
|
2026-01-09 19:32:06 +08:00
|
|
|
|
// LinuxDo Connect OAuth 登录(终端用户 SSO)
|
2026-01-09 13:52:27 +08:00
|
|
|
|
LinuxDoConnectEnabled bool
|
|
|
|
|
|
LinuxDoConnectClientID string
|
|
|
|
|
|
LinuxDoConnectClientSecret string
|
|
|
|
|
|
LinuxDoConnectClientSecretConfigured bool
|
|
|
|
|
|
LinuxDoConnectRedirectURL string
|
|
|
|
|
|
|
2025-12-26 15:40:24 +08:00
|
|
|
|
SiteName string
|
|
|
|
|
|
SiteLogo string
|
|
|
|
|
|
SiteSubtitle string
|
2026-01-04 17:02:38 +08:00
|
|
|
|
APIBaseURL string
|
2025-12-26 15:40:24 +08:00
|
|
|
|
ContactInfo string
|
2026-01-04 17:02:38 +08:00
|
|
|
|
DocURL string
|
2026-01-10 18:37:44 +08:00
|
|
|
|
HomeContent string
|
2025-12-26 15:40:24 +08:00
|
|
|
|
|
|
|
|
|
|
DefaultConcurrency int
|
|
|
|
|
|
DefaultBalance float64
|
2026-01-03 06:37:08 -08:00
|
|
|
|
|
|
|
|
|
|
// Model fallback configuration
|
|
|
|
|
|
EnableModelFallback bool `json:"enable_model_fallback"`
|
|
|
|
|
|
FallbackModelAnthropic string `json:"fallback_model_anthropic"`
|
|
|
|
|
|
FallbackModelOpenAI string `json:"fallback_model_openai"`
|
|
|
|
|
|
FallbackModelGemini string `json:"fallback_model_gemini"`
|
|
|
|
|
|
FallbackModelAntigravity string `json:"fallback_model_antigravity"`
|
2026-01-04 22:49:40 +08:00
|
|
|
|
|
|
|
|
|
|
// Identity patch configuration (Claude -> Gemini)
|
|
|
|
|
|
EnableIdentityPatch bool `json:"enable_identity_patch"`
|
|
|
|
|
|
IdentityPatchPrompt string `json:"identity_patch_prompt"`
|
2025-12-26 15:40:24 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type PublicSettings struct {
|
|
|
|
|
|
RegistrationEnabled bool
|
|
|
|
|
|
EmailVerifyEnabled bool
|
|
|
|
|
|
TurnstileEnabled bool
|
|
|
|
|
|
TurnstileSiteKey string
|
|
|
|
|
|
SiteName string
|
|
|
|
|
|
SiteLogo string
|
|
|
|
|
|
SiteSubtitle string
|
2026-01-04 17:02:38 +08:00
|
|
|
|
APIBaseURL string
|
2025-12-26 15:40:24 +08:00
|
|
|
|
ContactInfo string
|
2026-01-04 17:02:38 +08:00
|
|
|
|
DocURL string
|
2026-01-10 18:37:44 +08:00
|
|
|
|
HomeContent string
|
2026-01-09 12:05:25 +08:00
|
|
|
|
LinuxDoOAuthEnabled bool
|
2025-12-26 15:40:24 +08:00
|
|
|
|
Version string
|
|
|
|
|
|
}
|