39 lines
960 B
Go
39 lines
960 B
Go
package bootstrap
|
|
|
|
import (
|
|
"time"
|
|
"tm/pkg/config"
|
|
)
|
|
|
|
// Config holds configuration for the web command
|
|
type Config struct {
|
|
Server config.ServerConfig
|
|
Database config.DatabaseConfig
|
|
Cache config.CacheConfig
|
|
Logging config.LoggingConfig
|
|
RateLimit config.RateLimitConfig
|
|
Assets config.AssetsConfig
|
|
Notification config.NotificationConfig
|
|
Ollama config.OllamaConfig
|
|
HCaptcha config.HCaptchaConfig
|
|
Scraper ScraperConfig
|
|
UserAuth AuthConfig
|
|
CustomerAuth AuthConfig
|
|
}
|
|
|
|
type ScraperConfig struct {
|
|
BaseURL string `env:"SCRAPER_BASE_URL"`
|
|
Timeout time.Duration `env:"SCRAPER_TIMEOUT"`
|
|
}
|
|
|
|
type AuthConfig struct {
|
|
JWT JWTConfig
|
|
}
|
|
|
|
type JWTConfig struct {
|
|
AccessSecret string `env:"USER_AUTH_ACCESS_SECRET"`
|
|
RefreshSecret string `env:"USER_AUTH_REFRESH_SECRET"`
|
|
AccessExpiresIn int `env:"USER_AUTH_ACCESS_EXPIRES_IN"`
|
|
RefreshExpiresIn int `env:"USER_AUTH_REFRESH_EXPIRES_IN"`
|
|
}
|