added hcaptcha

This commit is contained in:
Mazyar
2025-12-05 18:10:05 +03:30
parent b8a10f355e
commit b01c0f9368
9 changed files with 222 additions and 18 deletions
+6
View File
@@ -89,6 +89,12 @@ type OllamaConfig struct {
EnableStreaming bool `env:"OLLAMA_ENABLE_STREAMING" default:"false"`
}
type HCaptchaConfig struct {
SecretKey string `env:"HCAPTCHA_SECRET_KEY"`
VerifyURL string `env:"HCAPTCHA_VERIFY_URL"`
Timeout time.Duration `env:"HCAPTCHA_TIMEOUT"`
}
// LoadConfig loads configuration with priority: OS environment variables > .env file
// OS environment variables take precedence over .env file values
func LoadConfig[T any](path string, config T) (T, error) {