This commit is contained in:
Tomas Dvorak
2026-01-26 08:13:18 +01:00
parent aa036b6550
commit dfc079288f
505 changed files with 95755 additions and 5712 deletions
+68
View File
@@ -89,6 +89,40 @@ type Config struct {
// Feature flags
RembgEnabled bool
// Club data mode: "auto" (FACR integration) or "manual" (no FACR/http scraping)
ClubDataMode string
// E-shop settings
EshopEnabled bool
EshopFrontendURL string
EshopAPIURL string
// Stripe (E-shop payments)
StripeEnabled bool
StripeSecretKey string
StripePublishableKey string
StripeWebhookSecret string
StripeCurrency string
StripeReturnURL string
// Revolut (E-shop payments)
RevolutEnabled bool
RevolutEnvironment string
RevolutAPIKey string
RevolutPublicKey string
RevolutWebhookSecret string
RevolutReturnURL string
RevolutWebhookURL string
// Packeta / Zasilkovna
PacketaAPIPassword string
PacketaWidgetAPIKey string
PacketaEshopName string
PacketaEnv string
// DeepSeek AI Support
DeepSeekAPIKey string
DeepSeekBaseURL string
}
var AppConfig *Config
@@ -200,6 +234,40 @@ func LoadConfig() {
// Feature flags
RembgEnabled: getEnvAsBool("REMBG_ENABLED", true),
// Club data mode: auto (FACR integration) or manual (no FACR/http scraping)
ClubDataMode: strings.ToLower(strings.TrimSpace(getEnv("CLUB_DATA_MODE", "auto"))),
// E-shop settings
EshopEnabled: getEnvAsBool("ESHOP_ENABLED", false),
EshopFrontendURL: getEnv("ESHOP_FRONTEND_URL", ""),
EshopAPIURL: getEnv("ESHOP_API_URL", ""),
// Stripe (E-shop payments)
StripeEnabled: getEnvAsBool("STRIPE_ENABLED", false),
StripeSecretKey: getEnv("STRIPE_SECRET_KEY", ""),
StripePublishableKey: getEnv("STRIPE_PUBLISHABLE_KEY", ""),
StripeWebhookSecret: getEnv("STRIPE_WEBHOOK_SECRET", ""),
StripeCurrency: getEnv("STRIPE_CURRENCY", "CZK"),
StripeReturnURL: getEnv("STRIPE_RETURN_URL", ""),
// Revolut (E-shop payments)
RevolutEnabled: getEnvAsBool("REVOLUT_ENABLED", false),
RevolutEnvironment: getEnv("REVOLUT_ENVIRONMENT", "sandbox"),
RevolutAPIKey: getEnv("REVOLUT_API_KEY", ""),
RevolutPublicKey: getEnv("REVOLUT_PUBLIC_KEY", ""),
RevolutWebhookSecret: getEnv("REVOLUT_WEBHOOK_SECRET", ""),
RevolutReturnURL: getEnv("REVOLUT_RETURN_URL", ""),
RevolutWebhookURL: getEnv("REVOLUT_WEBHOOK_URL", ""),
// Packeta / Zasilkovna
PacketaAPIPassword: getEnv("PACKETA_API_PASSWORD", ""),
PacketaWidgetAPIKey: getEnv("PACKETA_WIDGET_API_KEY", ""),
PacketaEshopName: getEnv("PACKETA_ESHP_NAME", "MyClubEshop"),
PacketaEnv: getEnv("PACKETA_ENV", "test"),
// DeepSeek AI Support (used by e-shop support chat)
DeepSeekAPIKey: getEnv("DEEPSEEK_API_KEY", ""),
DeepSeekBaseURL: getEnv("DEEPSEEK_BASE_URL", "https://api.deepseek.com"),
}
// Override allowed origins if specified in environment (comma-separated)