Add JSON annotations to configuration structs and new /config management endpoint

- Added JSON annotations across all configuration structs in `config.go`.
- Introduced `/config` management API endpoint to fetch complete configuration.
- Updated management API documentation (`MANAGEMENT_API.md`, `MANAGEMENT_API_CN.md`) with `/config` usage.
- Implemented `GetConfig` handler in `config_basic.go`.
This commit is contained in:
Luis Pater
2025-09-06 20:45:51 +08:00
parent c263398423
commit 6164f5c35b
5 changed files with 54 additions and 26 deletions

View File

@@ -150,6 +150,8 @@ func (s *Server) setupRoutes() {
mgmt := s.engine.Group("/v0/management")
mgmt.Use(s.mgmt.Middleware())
{
mgmt.GET("/config", s.mgmt.GetConfig)
mgmt.GET("/debug", s.mgmt.GetDebug)
mgmt.PUT("/debug", s.mgmt.PutDebug)
mgmt.PATCH("/debug", s.mgmt.PutDebug)