- Replace placeholder uptime with actual elapsed time since startup using startup_time
- Add fallback to UNIX epoch time if system time goes backwards
- Implement get_process_memory to read actual memory from /proc/self/status on Linux
- Add estimate_memory_usage fallback for non-Linux systems (35MB base estimate)
- Add get_redis_memory_usage to query Redis memory info as secondary fallback
- Update get_memory_usage to use
- Add SystemTime import from std::time
- Add startup_time field to ChargingEngine struct
- Initialize startup_time with SystemTime::now() during engine creation
- Replace placeholder uptime calculation with actual elapsed time since startup
- Add fallback to current time if system time goes backwards
- Implement get_process_memory to read actual memory from /proc/self/status on Linux
- Add estimate_memory_usage fallback for non-Linux systems (35MB base estimate)
- Add get_redis_memory_usage to query Redis memory info as secondary fallback
- Update get_memory_usage to use layered fallback approach (
- Alias charging_new as charging and errors_new as errors
- Add new charging module imports (charging_types, charging_engine, credit_management, rating_billing, monitoring_sync, sync_operations, monitoring)
- Add new error module imports (error_types, error_helpers)
- Prepare for gradual migration from monolithic to modular structure
- Move ES2 request/response types to es2_types.go
- Move profile operations (download, activate, deactivate, delete, status, list) to es2_operations.go
- Move helper methods (send requests, validation, generateRequestID) to es2_helpers.go
- Keep core ES2Service struct and ProvisionProfile in es2_client.go
- Revert sendDeactivationRequest parameter type from any back to interface{}
- Remove omitempty from Plan field in Subscriber model
- Update NotifySubscriberUpdate to use any instead of interface{}
- Update sendDeactivationRequest parameter type from interface{} to any
- Add os import for environment variable access
- Update getOperatorVariant to read OP from OPERATOR_VARIANT env var
- Add fallback to default "TelecomOP1234567" for development
- Add zero-padding for OP values shorter than 16 bytes
- Update comments to reference environment variable configuration
- Update bytedance/gopkg from v0.1.3 to v0.1.4
- Update bytedance/sonic/loader from v0.5.0 to v0.5.1
- Update gabriel-vasile/mimetype from v1.4.12 to v1.4.13
- Update gin-contrib/sse from v1.1.0 to v1.1.1
- Update go-playground/validator/v10 from v10.30.1 to v10.30.2
- Update goccy/go-json from v0.10.5 to v0.10.6
- Update golang/snappy from v0.0.4 to v1.0.0
- Update jackc/pgx/v5 from v5.6.0 to v5.9.1
- Update klauspost/compress from v1.17.6 to v1.18.5
- Replace XOR-based OPc generation with AES-128 ECB encryption
- Add getOperatorVariant for consistent OP across subscribers
- Add AES cipher block creation with error handling
- Add OP length validation for AES-128 block size
- Update generateOPc to use crypto/aes for 3GPP-compliant OPc derivation
- Add hardcoded OP placeholder with production configuration note
- Add AMFClient and ES2Service dependencies to SubscriberService
- Initialize AMF client with default URL and ES2 service in NewSubscriberService
- Implement provisionESIMProfile with EID validation, profile provisioning, activation, and AMF notification
- Implement deactivateESIMProfile with profile deactivation, status updates, and session termination
- Add generateOPc helper for deriving OPc from OP and K using XOR-based
- Reformat struct field alignment for improved readability
- Add SubscriberStatusInactive to SubscriberStatus enum
- Add blank lines after type declarations for consistency
- Adjust whitespace and alignment across all model structs
- Add AMFClient struct with base URL and HTTP client
- Add NewAMFClient with 30s timeout
- Add TerminateSession for subscriber session termination with reason and timestamp
- Add NotifySubscriberUpdate for subscriber status change notifications
- Add SessionTerminationRequest and SessionTerminationResponse models
- Add generateRequestID helper for request tracking
- Add ES2Service struct with HTTP client and ES2Config
- Add NewES2Service with 30s timeout and TLS configuration
- Add ProvisionProfile for eSIM profile provisioning with metadata support
- Add ActivateProfile, DeactivateProfile, and DeleteProfile for profile lifecycle management
- Add GetProfileStatus for profile state queries
- Add ListProfiles for eUICC profile enumeration
- Add ValidateEID and ValidateICCID for identifier
- Add ES2Config struct with base URL, API key, TLS verification, and requester ID fields
- Add LoadES2Config function with default SMDP connection parameters
- Include JSON tags for configuration serialization
- Add SubscriberService struct with Database and Config dependencies
- Add NewSubscriberService constructor
- Add CreateSubscriber with IMSI allocation, auth key generation, and eSIM provisioning support
- Add GetSubscriber and GetSubscriberByIMSI for subscriber retrieval
- Add UpdateSubscriber for subscriber information updates
- Add SuspendSubscriber with session termination
- Add TerminateSubscriber with session termination and eSIM profile deactivation
- Add ListSubscribers with pagination and
- Add Database struct with GORM PostgreSQL connection
- Add IMSIAllocation model for IMSI range tracking and allocation
- Add NewDatabase function with connection pooling (10 idle, 100 max connections, 1h lifetime)
- Add AutoMigrate for Subscriber, ServicePlan, Session, UsageRecord, and IMSIAllocation models
- Add InitializeIMSIAllocation with default IMSI range (1-999999999)
- Add CRUD operations for subscribers (Create, Get, GetByIMSI, Update, List)
- Add ListSubscribers with pagination, filtering by status/
- 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
- Add AppState struct to hold shared ChargingEngine instance
- Add CreditCheckRequest and CreditCheckResponse for credit validation
- Add DeductRequest for byte usage deduction
- Add AddCreditRequest for credit top-up operations
- Add BalanceResponse for IP address balance queries
- Add HealthResponse with default implementation for health check endpoint
- Derive Serialize/Deserialize traits for API request/response types
- Change module path from taas-platform to nutcas3 organization
- Remove golang-jwt/jwt dependency from api-server
- Add GORM PostgreSQL driver and GORM v1.31.1 to api-server
- Update go-resty/resty from v2.15.3 to v2.17.2 in carrier-connector
- Update rs/zerolog from v1.33.0 to v1.35.0 in carrier-connector
- Add go.sum files with complete dependency trees for both applications
- Include indirect dependencies
- Add XDP-based packet filtering with credit balance enforcement
- Create BPF hash maps for packet statistics, user credits, and block list tracking
- Implement packet size calculation and IP address extraction helpers
- Add credit deduction logic based on packet byte count
- Block packets when user credit balance falls below threshold
- Track bidirectional packet statistics for source and destination IPs
- Include sync_stats hook for periodic Redis
- Add free5gc-test command to run configuration validation script
- Add verify command to execute comprehensive deployment verification
- Include color-coded output for better user feedback
- Add comprehensive quick start documentation with step-by-step instructions
- Include prerequisites, installation, and service startup commands
- Add service architecture diagram showing component relationships
- Include common commands for development and operations
- Add troubleshooting section for common issues (port conflicts, permissions, service failures)
- Provide service access URLs for web dashboard, API server, and charging engine
- Add test-free5gc.sh script to verify free5GC configuration files and Docker Compose services
- Add verify-deployment.sh script for comprehensive platform deployment verification
- Include checks for Docker service status, port availability, and configuration files
- Add network connectivity tests for MongoDB and Redis
- Provide color-coded output and helpful command suggestions
- Exit with appropriate status codes for CI/CD integration
- Add AUSF configuration with nausf-auth service endpoint
- Add NSSF configuration with nnssf-nsselection service endpoint
- Add PCF configuration with npolicy-authorization service endpoint
- Add SMF configuration with dual DNN support (internet, internet2), PFCP settings, and IPv4 session pools
- Add UDM configuration with nudm-sdm, nudm-uecm, and nudm-ueau service endpoints
- Add UDR configuration with nudr-dr service endpoint
- Add NRF (Network Repository Function) configuration
- Configure SBI interface with service binding on port 8000
- Set PLMN identity (MCC: 208, MNC: 93) for France
- Configure slice type (SST: 1) and slice differentiator
- Add MongoDB integration for NRF data storage
- Set T3502 timer to 60 seconds
- Add MongoDB database service for free5GC with authentication
- Add NRF (Network Repository Function) service
- Add AMF (Access and Mobility Management Function) service
- Add SMF (Session Management Function) service
- Add UPF (User Plane Function) with NET_ADMIN capabilities and iptables setup
- Add UDR (Unified Data Repository) service
- Add UDM (Unified Data Management) service
- Add AUSF (Authentication Server Function) service
- Add AMF (Access and Mobility Management Function) configuration
- Configure NGAP and SBI interfaces with service bindings
- Set PLMN identity (MCC: 208, MNC: 93) and TAI list
- Configure security algorithms (integrity: NIA2/NIA1/NIA0, ciphering: NEA0/NEA1/NEA2)
- Add NRF integration and service registration settings
- Configure namf-comm and namf-evts service endpoints
Docker:
- Add production-ready Dockerfiles for all microservices
- Optimize for multi-stage builds and minimal image sizes
Kubernetes:
- Add namespace and service manifests
- Include MongoDB and Redis deployment configurations
- Configure API server and charging engine deployments
Documentation:
- Add comprehensive README with platform overview
- Include technology stack and quick start instructions
- Provide prerequisites and setup guidance
- Add Go-based API server and carrier connector services
- Add Rust-based charging engine and packet gateway services
- Add Docker Compose configuration for local development
- Add comprehensive documentation (API, Architecture, Deployment)
- Add development scripts for Redis, MongoDB, and environment setup
- Add workspace configuration for Go modules and pnpm
- Remove unnecessary documentation files from web-dashboard
- Add project build configuration (Makefile, Cargo.toml)
This commit establishes the foundational microservices architecture for the sovereign Telecom-as-a-Service platform.