Commit Graph
7 Commits
Author SHA1 Message Date
nutcas3 552d9d5e1f feat: Move charging routes to public v1 group and add health check endpoint
- Move charging routes from protected /api group to public /v1/charging group for packet-gateway integration
- Add GET /v1/health endpoint returning status ok
- Remove registerChargingRoutes function (routes now inline in registerV1Routes)
- Remove registerChargingRoutes call from apiProtected group
2026-04-25 03:33:08 +03:00
nutcas3 7aa582ee3d feat: Add charging routes and handler integration to API server
- Add chargingH field to serverDeps struct
- Add ChargingEngineClient initialization in buildDeps
- Add NewChargingHandler with chargingEngineClient dependency
- Add registerChargingRoutes function with /charging group
- Add POST /charging/credit/:ip/check endpoint
- Add GET /charging/credit/:ip/balance endpoint
- Add POST /charging/credit/:ip/add endpoint
- Add POST /charging/credit/:ip/deduct endpoint
- Call registerChargingRoutes in
2026-04-25 03:32:05 +03:00
nutcas3 c0034b195a feat: Refactor api-server main.go to extract route setup and handlers into separate packages for improved modularity
- Move route registration logic to registerV1Routes with dependency injection pattern
- Extract metrics collector initialization to buildMetricsCollector helper function
- Extract service/handler dependency initialization to buildDeps helper function
- Remove all inline handler implementations (auth/services/monitoring/deployments/plugins/automation/config/chaos/billing routes)
- Remove all metrics collection helper functions (startMetricsCollection/
2026-04-24 08:58:53 +03:00
nutcas3 0e28b8a1ac feat: Add comprehensive API server with REST endpoints, WebSocket support, RBAC, monitoring, and service integrations
- Add server.go with Swagger documentation endpoint, WebSocket handler, health/ready/live monitoring endpoints
- Add global middleware: rate limiting, performance optimization, security headers, CORS, request size (10MB), timeout (30s)
- Add performance metrics endpoint with 100ms threshold monitoring
- Add authentication service initialization with JWT, WebSocket hub, health monitor
2026-04-20 18:09:53 +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 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