Commit Graph
67 Commits
Author SHA1 Message Date
nutcas3 2fa56f0d83 feat: Add InfluxDB time-series storage with usage, system, and charging metrics tracking
- Add TimeSeriesStorage with InfluxDB client, write API, and query API for org/bucket
- Add metric types: MetricPoint, UsageMetrics, SystemMetrics, ChargingMetrics with subscriber/IMSI/transaction fields
- Add StoreUsageMetrics, StoreSystemMetrics, StoreChargingMetrics, and StorePacketMetrics to write metrics to InfluxDB
- Add GetUsageStats to query subscriber usage statistics for time range with last aggreg
2026-04-17 15:53:06 +03:00
nutcas3 a1222025e0 feat: Add Prometheus metrics collector with comprehensive telecom system monitoring
- Add MetricsCollector with HTTP middleware, subscriber tracking, and system uptime monitoring
- Add HTTP request metrics: total requests counter and duration histogram by method/endpoint/status
- Add subscriber metrics: total, active, and suspended subscriber gauges
- Add usage metrics: data bytes, voice seconds, and SMS count counters by subscriber
- Add charging metrics: credit balance gauge and payment transaction counter by
2026-04-17 15:52:53 +03:00
nutcas3 547abf1889 feat: Add database methods for transactions, payment methods, alerts, and notifications
- Add CreateTransaction to insert new transaction records
- Add UpdateSubscriberBalance to increment/decrement balance using SQL expression
- Add CreatePaymentMethod, GetPaymentMethod, DeletePaymentMethod, and ListPaymentMethods for payment method CRUD
- Add GetTransaction, GetTransactionByGatewayID, GetTransactionByChargeID to query transactions by different IDs
- Add UpdateTransaction to save transaction changes
- Add List
2026-04-17 15:52:41 +03:00
nutcas3 d24aa2cef0 feat: Add RetrievePaymentMethodFromToken to extract card details from Stripe tokens
- Add RetrievePaymentMethodFromToken to create payment method from token and extract card details
- Import paymentmethod package from stripe-go/v82
- Import payment package for PaymentMethodDetails type
- Return PaymentMethodDetails with ID, type, last4, brand, expiry dates, fingerprint, and creation timestamp
- Add error handling for payment method creation and missing card details
2026-04-17 15:51:50 +03:00
nutcas3 3d0f0188fb feat: Add Stripe payment gateway with customer management, invoicing, and webhook validation
- Add StripeGateway with secret key, webhook secret, and HTTP client with 30s timeout
- Add ProcessPayment to create payment intents with amount conversion to cents and metadata
- Add CreateCustomer to create Stripe customers with subscriber details and IMSI metadata
- Add ProcessRefund to process full or partial refunds via payment intent ID
- Add GetPaymentStatus to retrieve payment intent status and details
2026-04-17 15:50:03 +03:00
nutcas3 cbfe5a4b9f feat: Implement real-time subscription polling for subscriber and alert updates
- Update SubscribeToSubscriberUpdates to poll database every 3 seconds for subscriber changes since last update
- Add buffered channel (size 5) to prevent blocking on subscriber updates
- Track lastUpdatedAt timestamp to query only new subscriber changes
- Add SubscribeToAlertUpdates to poll database every 2 seconds for new alerts
- Add buffered channel (size 10) for alert updates with ID-based filtering
- Support optional
2026-04-17 15:47:47 +03:00
nutcas3 9d2e5b7175 feat: Remove comment separators and fix AlertUpdates severity parameter conversion
- Remove comment separators for mutations, subscriptions, filter helpers, and GraphQL handler sections
- Update AlertUpdates to convert AlertSeverity enum to string pointer for service call
- Add inline comment explaining severity conversion in AlertUpdates resolver
2026-04-17 15:46:55 +03:00
nutcas3 9ce03cf81e feat: Replace placeholder data with database queries in subscriber service methods
- Update GetAccount to query actual usage events and balance from database instead of returning zeros
- Update ListInvoices to query invoices with filters, pagination, and preload subscriber data
- Update GetInvoice to query invoice by ID with line items and subscriber preloading
- Update ListRatingPlans to query active rating plans ordered by monthly fee
- Update GetRatingPlan to query rating plan by ID with active
2026-04-17 15:44:59 +03:00
nutcas3 7cbd3b89b6 feat: Add payment gateway with Stripe integration, transaction processing, and webhook validation
- Add PaymentGateway interface with ProcessPayment, RefundPayment, GetPaymentStatus, CreatePaymentMethod, DeletePaymentMethod, and ValidateWebhook methods
- Add payment request/response types: PaymentRequest, PaymentResponse, RefundResponse, PaymentStatus, CreatePaymentMethodRequest, PaymentMethod
- Add payment status types: PENDING, PROCESSING, COMPLETED, FAILED, REFUNDED, CANCELLED
- Add payment method types
2026-04-17 15:44:41 +03:00
nutcas3 adbdb40066 feat: Add charging engine HTTP client with credit management and health monitoring
- Add ChargingEngineClient with base URL and HTTP client with configurable timeout
- Add CheckCredit to verify subscriber credit availability by IP with bytes requested
- Add DeductCredit to deduct bytes from subscriber credit balance
- Add AddCredit to add bytes to subscriber credit balance
- Add GetBalance to retrieve current credit balance for subscriber by IP
- Add HealthCheck to verify charging engine availability
2026-04-17 15:43:53 +03:00
nutcas3 99bff17756 feat: Add charging service with usage tracking, system monitoring, and real-time statistics
- Add ChargingService with database and charging engine client dependencies
- Add GetSystemStats to retrieve active sessions, accounts, blocked users, and uptime metrics
- Add GetHealthStatus to check Redis connection, sync status, and memory usage
- Add GetUsageStats to get subscriber usage statistics with data/voice/SMS volumes, costs, and trends
- Add GetRealTimeUsage to track current session and today's usage metrics
2026-04-17 15:41:11 +03:00
nutcas3 d248b9b5e5 feat: Add invoice service with monthly invoice generation, payment tracking, and automated billing
- Add InvoiceService with database dependency for invoice management operations
- Add GenerateMonthlyInvoice to create invoices with plan fees and usage charges from billing period
- Add SendInvoice to update invoice status to pending (email integration TODO)
- Add MarkInvoiceAsPaid to update invoice payment status
- Add GetOverdueInvoices to query invoices past due date with pending status
- Add GetSubscriber
2026-04-17 15:40:57 +03:00
nutcas3 72d5a9c8e0 feat: Add account management models with billing, payments, alerts, and system monitoring types
- Add SubscriberAccount with balance, usage limits (data/voice/SMS), and status tracking
- Add UsageEvent for tracking usage sessions with volume, rate, and cost
- Add Invoice with line items and status (DRAFT, PENDING, PAID, OVERDUE, CANCELLED)
- Add RatingPlan with rate definitions for data/voice/SMS and monthly fees
- Add Alert with types (LOW_BALANCE, HIGH_USAGE, PAYMENT_FAILED, SYSTEM_ERROR) and severity levels
- Add Pay
2026-04-17 15:38:47 +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 764e95619b feat: Add GraphQL, Prometheus, InfluxDB, and Stripe dependencies to API server
- Add gqlgen v0.17.89 for GraphQL server implementation
- Add prometheus/client_golang v1.23.2 for metrics collection
- Add influxdata/influxdb-client-go/v2 v2.14.0 for time-series metrics storage
- Add stripe/stripe-go/v82 v82.5.1 for payment processing
- Update go.mongodb.org/mongo-driver/v2 from v2.5.0 to v2.5.1
- Add supporting dependencies: gqlparser, oapi-codegen/runtime, line-protocol, prometheus client_model/
2026-04-17 15:36:14 +03:00
nutcas3 ccd50ac79e feat: Add API server main entry point with GraphQL, metrics collection, and system monitoring
- Add main server setup with Gin router, GraphQL handler, and graceful shutdown
- Initialize database connection and metrics collectors (Prometheus and InfluxDB time-series)
- Add HTTP middleware for Prometheus metrics collection
- Add /metrics endpoint for Prometheus scraping and /health endpoint for health checks
- Implement periodic metrics collection (30s interval) for subscribers, sessions, and system
2026-04-17 15:35:33 +03:00
nutcas3 bcc42ae4c3 feat: Add subscriber service methods for account management, invoicing, alerts, and payment operations
- Add GetAccount to retrieve subscriber account information with balance and usage limits
- Add ListInvoices/GetInvoice for invoice management with line items
- Add ListRatingPlans/GetRatingPlan for rating plan queries
- Add ListAlerts/CreateAlert/ResolveAlert for alert management
- Add SearchSubscribers for subscriber search functionality
- Add SubscribeToSubscriberUpdates/SubscribeToAlertUpdates
2026-04-17 15:35:22 +03:00
nutcas3 129a61c826 test: Add unit tests for GraphQL resolver helper functions
- Add parseID tests for valid IDs, invalid format, and zero values
- Add encodeCursor/decodeCursor tests for base64 cursor encoding/decoding with valid and invalid inputs
- Add buildUsageFilterWhere tests for empty filters, usage type filtering, and cost range filtering
- Add ResolverRoot method tests to verify Query/Mutation/Subscription return receiver
- Include helper function implementations (encodeCursor, decodeCursor, buildUsageFilterWhere)
2026-04-17 15:21:38 +03:00
nutcas3 eef5f21717 feat: Add GraphQL code generation scaffolding with comprehensive type definitions and resolver interfaces
- Add custom GraphQL types and enums: SubscriberStatus, ProfileStatus, UsageType, SessionStatus, PaymentMethodType, InvoiceStatus, AlertType, AlertSeverity, SubscriberSort, UsagePeriod, TrendDirection
- Define input types: SubscriberFilter, UsageEventFilter, CreateSubscriberInput, UpdateSubscriberInput, TopUpInput, UsageStatsInput, PaymentMethodInput, CreateAlertInput
- Define output types: Page
2026-04-17 15:21:21 +03:00
nutcas3 1383e08645 feat: Implement GraphQL resolvers for subscriber management, charging operations, and real-time monitoring
- Add Resolver struct with database, subscriber, charging, and ES2 service dependencies
- Implement query resolvers: Subscriber, SubscriberByImsi, Subscribers, SubscriberAccount, UsageEvents, UsageStats, RealTimeUsage, Invoices, Invoice, RatingPlans, RatingPlan, Alerts, SystemStats, HealthStatus, SearchSubscribers, SearchUsageEvents
- Implement mutation resolvers: CreateSubscriber, UpdateSubscriber, DeleteSubscriber, TopUpBalance, Suspend
2026-04-17 15:21:03 +03:00
nutcas3 86141062fe feat: Add comprehensive GraphQL schema for subscriber management and charging operations
- Add custom scalars (DateTime, JSON) for complex data types
- Define enums for subscriber status, profile status, usage types, session status, payment methods, invoice status, and alert types
- Add core types: Subscriber, SubscriberAccount, UsageEvent, RatingPlan, ChargingSession, PaymentMethod, Invoice, Alert
- Add system monitoring types: SystemStats, HealthStatus
- Implement Relay-style pagination with Connection
2026-04-17 15:18:06 +03:00
nutcas3 386707d02f feat: Implement actual uptime calculation and memory usage tracking in monitoring
- 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
2026-04-14 20:08:37 +03:00
nutcas3 da712a524f feat: Add startup_time field to ChargingEngine for tracking service uptime
- Add SystemTime import from std::time
- Add startup_time field to ChargingEngine struct
- Initialize startup_time with SystemTime::now() during engine creation
2026-04-14 20:08:11 +03:00
nutcas3 b6edcb8436 feat: Implement actual uptime and memory usage tracking in monitoring
- 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 (
2026-04-14 17:42:03 +03:00
nutcas3 c63c92245f refactor: Reorganize charging and errors modules into proper directory structure
- Move charging module files into charging/ directory (types.rs, engine.rs, credit_management.rs, rating_billing.rs)
- Move error module files into errors/ directory (types.rs, helpers.rs)
- Create mod.rs files for charging and errors modules with simplified exports
- Update import paths to use super:: for intra-module references
- Remove charging_new/errors_new aliases and use charging/errors directly
- Simplify module
2026-04-14 16:29:27 +03:00
nutcas3 c1f408c789 refactor: Extract credit management and monitoring functionality into separate modules
- Move credit operations (get_balance, add_credit, deduct_credit, check_credit) to credit_management.rs
- Move user blocking operations (block_user, unblock_user, is_user_blocked) to credit_management.rs
- Move subscriber account operations (get_subscriber_account, update_subscriber_account, record_usage_event) to credit_management.rs
- Move monitoring operations (get_system_statistics, health_check, get_performance
2026-04-14 16:25:36 +03:00
nutcas3 a42ef5d8db refactor: Transition to new modular charging and error handling architecture
- 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
2026-04-14 16:24:21 +03:00
nutcas3 2a2f481daa refactor: Split charging engine into separate modules for better code organization
- Move core types (SubscriberAccount, AccountStatus, UsageEvent, UsageType, RatingPlan, ChargingSession, SessionStatus, ChargingRule, Condition, Action) to charging_types.rs
- Move main ChargingEngine struct and initialization to charging_engine.rs
- Move credit operations (check_credit, get_balance, deduct_credit, add_credit) to credit_management.rs
- Move account operations (create_account, get_account, top_up_balance,
2026-04-14 16:24:04 +03:00
nutcas3 577f625bbd refactor: Split error handling into separate modules for better code organization
- Move ChargingError enum and IntoResponse implementation to error_types.rs
- Move ChargingResult, ErrorContext trait, validation functions, error conversions, and logging to error_helpers.rs
- Keep module declarations and re-exports in errors.rs
- Add validate_imsi, validate_session_id, and validate_amount validation helpers
- Add log_error helper for structured error logging with tracing
- Update error variants:
2026-04-14 16:22:56 +03:00
nutcas3 a335c6754e refactor: Split subscriber service into separate files for better code organization
- Move IMSI allocation logic to subscriber_imsi.go
- Move authentication key generation (generateAuthKeys, getOperatorVariant, generateOPc) to subscriber_auth.go
- Move eSIM profile operations (provisionESIMProfile, deactivateESIMProfile) to subscriber_esim.go
- Keep core subscriber CRUD operations and session management in subscriber.go
- Remove unused crypto/aes, crypto/rand, encoding/hex, and os imports from main
2026-04-14 16:22:22 +03:00
nutcas3 3a3b4d93a0 refactor: Split ES2 client into separate files for better code organization
- 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{}
2026-04-14 16:22:07 +03:00
nutcas3 62cdffee2b feat: Remove unused generateRequestID helper function from AMF client
- Remove generateRequestID function and its fmt/time imports
- Function was not being used in AMF client implementation
2026-04-14 16:21:43 +03:00
nutcas3 1ead99440e feat: Replace interface{} with any type alias for improved code clarity
- Remove omitempty from Plan field in Subscriber model
- Update NotifySubscriberUpdate to use any instead of interface{}
- Update sendDeactivationRequest parameter type from interface{} to any
2026-04-14 16:07:04 +03:00
nutcas3 13355a07e7 feat: Add environment-based operator variant configuration with padding support
- 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
2026-04-14 16:06:09 +03:00
nutcas3 745ebe3bb4 chore: Update Go dependencies to latest versions
- 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
2026-04-14 16:04:19 +03:00
nutcas3 e260ea3baa feat: Implement proper AES-128 OPc derivation per 3GPP specification
- 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
2026-04-14 16:03:46 +03:00
nutcas3 a78599fa1f feat: Implement eSIM provisioning and AMF integration in subscriber service
- 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
2026-04-14 16:00:46 +03:00
nutcas3 92ed80fec6 style: Format subscriber models with consistent spacing and add inactive status
- 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
2026-04-14 16:00:33 +03:00
nutcas3 6e11d40f5e feat: Add AMF client for session termination and subscriber status notifications
- 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
2026-04-14 16:00:24 +03:00
nutcas3 2e1300282d feat: Add ES2Service for GSMA ES2+ eSIM profile management operations
- 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
2026-04-14 16:00:15 +03:00
nutcas3 f10d180bf4 feat: Add charging engine with Redis-based credit management and usage tracking
- Add ChargingEngine struct with Redis client, rating plans, and sync interval
- Add SubscriberAccount model with balance, data/voice/SMS limits and usage tracking
- Add UsageEvent model for billing events with cost calculation
- Add RatingPlan model with data/voice/SMS rates and limits
- Add AccountStatus enum (Active, Suspended, Terminated, Blocked)
- Add UsageType enum (Data, Voice, SMS)
- Add sync_usage_data for
2026-04-14 15:53:14 +03:00
nutcas3 cf92bd0ab4 chore: Remove unused log import from carrier-connector 2026-04-14 15:52:49 +03:00
nutcas3 02246edea1 feat: Add ES2+ configuration management for carrier-connector
- 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
2026-04-14 15:52:38 +03:00
nutcas3 24baebbf37 feat: Add subscriber service with IMSI allocation, authentication, and lifecycle management
- 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
2026-04-14 15:52:23 +03:00
nutcas3 5c4281f01a feat: Add subscriber data models with GORM integration and 5G network support
- Add Subscriber model with IMSI, MSISDN, IMEI, and authentication fields
- Add ServicePlan model with data/voice/SMS limits and QoS settings
- Add Session model with PDU address, DNN, SNSSAI, and usage tracking
- Add UsageRecord model for billing with usage type, volume, rate, and cost
- Add SubscriberStatus enum (active, suspended, terminated, provisioning)
- Add ProfileStatus enum for eSIM profile state tracking
- Add SessionStatus enum (active, inactive, terminating)
- Add UsageType enum (data, voice, sms)
- Add PLMN struct with
2026-04-14 15:52:10 +03:00
nutcas3 a2021f64af feat: Add subscriber HTTP handlers with CRUD operations and lifecycle management
- Add SubscriberHandler struct with SubscriberService dependency
- Add NewSubscriberHandler constructor
- Add CreateSubscriber endpoint for subscriber creation with IMSI allocation
- Add GetSubscriber endpoint for ID-based retrieval
- Add GetSubscriberByIMSI endpoint for IMSI-based lookup
- Add UpdateSubscriber endpoint for subscriber information updates
- Add ListSubscribers endpoint with pagination, filtering (status, organization_id), and search
- Add SuspendSubscriber endpoint for subscriber suspension and session
2026-04-14 15:50:43 +03:00
nutcas3 008f7415a6 feat: Add ES2+ client for eSIM profile management operations
- Add ES2Client struct with HTTP client and configuration
- Add NewES2Client with 30s timeout and TLS configuration
- Add DownloadProfile for eSIM profile download requests
- Add GetProfileStatus for profile state queries
- Add DeleteProfile for profile removal operations
- Add EnableProfile and DisableProfile for profile state management
- Add request/response types for all ES2+ operations (EID, ICCID, profile type, confirmation code)
- Add setHeaders helper
2026-04-14 15:50:28 +03:00
nutcas3 8366e0011d feat: Add database layer with GORM integration and subscriber management
- 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/
2026-04-14 15:50:18 +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
nutcas3 b84971c004 feat: Add data models for charging engine API endpoints
- 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
2026-04-14 15:49:58 +03:00