Commit Graph
7 Commits
Author SHA1 Message Date
nutcas3 b734ea7d3a refactor: Add environment variable support to API server configuration and fix build path
- Add getEnv and getEnvInt helper functions for reading environment variables with defaults
- Update all configuration fields to use environment variables (DB_HOST, REDIS_HOST, API_PORT, etc.)
- Change CI build command from ./cmd/server.go to ./cmd/ directory path
2026-04-26 00:15:45 +03:00
nutcas3 d7e83c1f0d feat: Add API key authentication support to charging engine client
- Add APIKey field to ChargingEngineConfig struct
- Add apiKey field to ChargingEngineClient struct
- Add setAPIKeyHeader method to set X-API-Key header when API key is configured
- Call setAPIKeyHeader in CheckCredit, DeductCredit, AddCredit, GetBalance, and HealthCheck methods
2026-04-25 03:43:32 +03:00
nutcas3 546c9cd69f feat: Add authentication configuration with JWT secret and reorganize environment variables with categorized sections
- Add AuthConfig struct with JWTSecret field to config package
- Add Auth field to Config struct with JSON tag for authentication settings
- Add JWT_SECRET to Auth config with default value "change-me-in-production"
- Replace MONGODB_URI with DATABASE_URL using PostgreSQL connection string in .env.example
- Add categorized sections in .env.example: Database/Server/Authentication/
2026-04-23 02:58:01 +03:00
NutcaseandGitHub 1b2b9d2412 Revert "Revert "App layer"" (#5) 2026-04-17 16:08:27 +03:00
NutcaseandGitHub efed7e936c Revert "App layer" 2026-04-17 15:59:31 +03:00
nutcas3 565052e406 feat: Add configuration for payment processing, charging engine, metrics, and time-series storage
- Add PaymentConfig with Stripe API key and webhook secret fields
- Add ChargingEngineConfig with base URL and timeout settings
- Add InfluxDBConfig with URL, token, org, and bucket fields
- Add MetricsPort field to ServerConfig for Prometheus metrics endpoint
- Set default values: MetricsPort 9090, ChargingEngine localhost:3001, InfluxDB localhost:8086
- Update Config struct to include Payment, ChargingEngine, and Infl
2026-04-17 15:36:44 +03:00
nutcas3 5b8c5d81d5 feat: Add configuration management for api-server
- Add Config struct with server, database, Redis, IMSI, and ES2+ settings
- Add ServerConfig with port and timeout settings (30s read/write)
- Add DatabaseConfig for PostgreSQL connection parameters
- Add RedisConfig for cache connection settings
- Add IMSIConfig with France MCC+MNC prefix (20893) and IMSI range
- Add ES2Config for eSIM provisioning with SMDP connection parameters
- Add LoadConfig function with default configuration values
- Include JSON
2026-04-14 15:50:08 +03:00