Няма описание
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bootconfig_routes.go 1009B

123456789101112131415161718192021222324252627
  1. package routes
  2. import (
  3. "context"
  4. "git.x2erp.com/qdy/go-base/authbase"
  5. "git.x2erp.com/qdy/go-base/ctx"
  6. "git.x2erp.com/qdy/go-base/model/response"
  7. "git.x2erp.com/qdy/go-base/webx/router"
  8. "git.x2erp.com/qdy/go-db/factory/database"
  9. "git.x2erp.com/qdy/go-svc-configure/internal/service/bootconfig"
  10. )
  11. func RegisterBootconfigRoutes(ws *router.RouterService, dbFactory *database.DBFactory) {
  12. // boot config
  13. ws.POST("/api/boot/configs",
  14. func(ctx context.Context, reqCtx *ctx.RequestContext) (*response.QueryResult[[]bootconfig.BootConfig], error) {
  15. return bootconfig.GetBootConfigs(ctx, dbFactory, reqCtx), nil
  16. },
  17. ).Use(authbase.BasicAuth).Desc("获取boot配置项").Register()
  18. ws.POST("/api/boot/configs/search",
  19. func(keyword string, ctx context.Context, reqCtx *ctx.RequestContext) (*response.QueryResult[[]bootconfig.BootConfig], error) {
  20. return bootconfig.SearchBootConfigs(ctx, dbFactory, keyword, reqCtx), nil
  21. },
  22. ).Use(authbase.BasicAuth).Desc("搜索boot配置项").Register()
  23. }