- Go module with Gin, GORM, JWT, excelize dependencies - Configuration loading from YAML with all settings - GORM models for users, categories, components, configurations, alerts - Repository layer for all entities - Services: auth (JWT), pricing (median/average/weighted), components, quotes, configurations, export (CSV/XLSX), alerts - Middleware: JWT auth, role-based access, CORS - HTTP handlers for all API endpoints - Main server with dependency injection and graceful shutdown Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
59 lines
1.3 KiB
YAML
59 lines
1.3 KiB
YAML
# QuoteForge Configuration
|
|
# Copy this file to config.yaml and update values
|
|
|
|
server:
|
|
host: "0.0.0.0"
|
|
port: 8080
|
|
mode: "release" # debug | release
|
|
read_timeout: "30s"
|
|
write_timeout: "30s"
|
|
|
|
database:
|
|
host: "localhost"
|
|
port: 3306
|
|
name: "RFQ_LOG"
|
|
user: "quoteforge"
|
|
password: "CHANGE_ME"
|
|
max_open_conns: 25
|
|
max_idle_conns: 5
|
|
conn_max_lifetime: "5m"
|
|
|
|
auth:
|
|
jwt_secret: "CHANGE_ME_MIN_32_CHARACTERS_LONG"
|
|
token_expiry: "24h"
|
|
refresh_expiry: "168h" # 7 days
|
|
|
|
pricing:
|
|
default_method: "weighted_median" # median | average | weighted_median
|
|
default_period_days: 90
|
|
freshness_green_days: 30
|
|
freshness_yellow_days: 60
|
|
freshness_red_days: 90
|
|
min_quotes_for_median: 3
|
|
popularity_decay_days: 180
|
|
|
|
export:
|
|
temp_dir: "/tmp/quoteforge-exports"
|
|
max_file_age: "1h"
|
|
company_name: "Your Company Name"
|
|
|
|
alerts:
|
|
enabled: true
|
|
check_interval: "1h"
|
|
high_demand_threshold: 5 # КП за 30 дней
|
|
trending_threshold_percent: 50 # % роста для алерта
|
|
|
|
notifications:
|
|
email_enabled: false
|
|
smtp_host: "smtp.example.com"
|
|
smtp_port: 587
|
|
smtp_user: ""
|
|
smtp_password: ""
|
|
from_address: "quoteforge@example.com"
|
|
|
|
logging:
|
|
level: "info" # debug | info | warn | error
|
|
format: "json" # json | text
|
|
output: "stdout" # stdout | file
|
|
file_path: "/var/log/quoteforge/app.log"
|