mirror of
https://github.com/serty2005/rmser.git
synced 2026-02-04 19:02:33 -06:00
Перевел на multi-tenant
Добавил поставщиков Накладные успешно создаются из фронта
This commit is contained in:
@@ -14,6 +14,7 @@ type Config struct {
|
||||
RMS RMSConfig
|
||||
OCR OCRConfig
|
||||
Telegram TelegramConfig
|
||||
Security SecurityConfig
|
||||
}
|
||||
|
||||
type AppConfig struct {
|
||||
@@ -31,23 +32,26 @@ type RedisConfig struct {
|
||||
Password string `mapstructure:"password"`
|
||||
DB int `mapstructure:"db"`
|
||||
}
|
||||
|
||||
type OCRConfig struct {
|
||||
ServiceURL string `mapstructure:"service_url"`
|
||||
}
|
||||
|
||||
type RMSConfig struct {
|
||||
BaseURL string `mapstructure:"base_url"`
|
||||
Login string `mapstructure:"login"`
|
||||
Password string `mapstructure:"password"` // Исходный пароль, хеширование будет в клиенте
|
||||
}
|
||||
|
||||
type OCRConfig struct {
|
||||
ServiceURL string `mapstructure:"service_url"`
|
||||
}
|
||||
|
||||
type TelegramConfig struct {
|
||||
Token string `mapstructure:"token"`
|
||||
AdminIDs []int64 `mapstructure:"admin_ids"`
|
||||
WebAppURL string `mapstructure:"web_app_url"`
|
||||
}
|
||||
|
||||
type SecurityConfig struct {
|
||||
SecretKey string `mapstructure:"secret_key"` // 32 bytes for AES-256
|
||||
}
|
||||
|
||||
// LoadConfig загружает конфигурацию из файла и переменных окружения
|
||||
func LoadConfig(path string) (*Config, error) {
|
||||
viper.AddConfigPath(path)
|
||||
|
||||
Reference in New Issue
Block a user