实现七月迭代公共技术基础
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m20s

This commit is contained in:
2026-07-23 17:52:48 +09:00
parent f7c42252c0
commit 17782d5f8e
76 changed files with 5246 additions and 158 deletions

View File

@@ -0,0 +1,31 @@
package routes
import (
"github.com/gofiber/fiber/v2"
"github.com/break/junhong_cmp_fiber/internal/handler/admin"
"github.com/break/junhong_cmp_fiber/internal/model/dto"
"github.com/break/junhong_cmp_fiber/pkg/openapi"
)
// registerSystemConfigRoutes 注册受控系统配置路由。
func registerSystemConfigRoutes(router fiber.Router, handler *admin.SystemConfigHandler, doc *openapi.Generator, basePath string) {
configs := router.Group("/system-configs")
groupPath := basePath + "/system-configs"
Register(configs, doc, groupPath, "GET", "", handler.List, RouteSpec{
Summary: "查询受控系统配置",
Tags: []string{"系统配置"},
Input: new(dto.SystemConfigListRequest),
Output: new(dto.SystemConfigListResponse),
Auth: true,
})
Register(configs, doc, groupPath, "PUT", "/:key", handler.Update, RouteSpec{
Summary: "更新受控系统配置",
Tags: []string{"系统配置"},
Input: new(dto.UpdateSystemConfigParams),
Output: new(dto.SystemConfigItem),
Auth: true,
})
}