Files
junhong_cmp_fiber/internal/routes/system_config.go
break 17782d5f8e
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m20s
实现七月迭代公共技术基础
2026-07-23 17:52:48 +09:00

32 lines
1.0 KiB
Go

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,
})
}