registerSystemRoutes registers all system-related routes
(rg *gin.RouterGroup)
| 246 | |
| 247 | // registerSystemRoutes registers all system-related routes |
| 248 | func (s *Server) registerSystemRoutes(rg *gin.RouterGroup) { |
| 249 | // Create system handler |
| 250 | h := handlers.NewSystemHandler(s.store) |
| 251 | |
| 252 | system := rg.Group("/system") |
| 253 | { |
| 254 | // Configuration management |
| 255 | config := system.Group("/config") |
| 256 | { |
| 257 | config.GET("", h.ListConfig) |
| 258 | config.GET("/:key", h.GetConfig) |
| 259 | config.PUT("/:key", h.UpdateConfig) |
| 260 | config.DELETE("/:key", h.DeleteConfig) |
| 261 | } |
| 262 | |
| 263 | // System operations |
| 264 | system.GET("/info", h.GetInfo) |
| 265 | system.GET("/health", h.GetHealth) |
| 266 | system.GET("/stats", h.GetStats) |
| 267 | system.POST("/reload", h.Reload) |
| 268 | system.POST("/gc", h.RunGC) |
| 269 | system.POST("/backup", h.Backup) |
| 270 | } |
| 271 | |
| 272 | // Pool routes |
| 273 | s.registerPoolRoutes(rg) |
| 274 | |
| 275 | // Room routes |
| 276 | s.registerRoomRoutes(rg) |
| 277 | } |
| 278 | |
| 279 | // registerPoolRoutes registers pool-related routes |
| 280 | func (s *Server) registerPoolRoutes(rg *gin.RouterGroup) { |
no test coverage detected