routes.go 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. // Code generated by goctl. DO NOT EDIT.
  2. package handler
  3. import (
  4. "net/http"
  5. dtgateway "GtDataStore/app/cmd/dtgateway/internal/handler/dtgateway"
  6. "GtDataStore/app/cmd/dtgateway/internal/svc"
  7. "github.com/zeromicro/go-zero/rest"
  8. )
  9. func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
  10. server.AddRoutes(
  11. rest.WithMiddlewares(
  12. []rest.Middleware{serverCtx.DataSign},
  13. []rest.Route{
  14. {
  15. Method: http.MethodGet,
  16. Path: "/working-uf/info",
  17. Handler: dtgateway.WorkingUfHandler(serverCtx),
  18. },
  19. {
  20. Method: http.MethodGet,
  21. Path: "/working-uf/cycle",
  22. Handler: dtgateway.WorkingUfByCycleHandler(serverCtx),
  23. },
  24. {
  25. Method: http.MethodGet,
  26. Path: "/working-ro/info",
  27. Handler: dtgateway.WorkingRoHandler(serverCtx),
  28. },
  29. {
  30. Method: http.MethodGet,
  31. Path: "/working-chest/info",
  32. Handler: dtgateway.WorkingChestHandler(serverCtx),
  33. },
  34. {
  35. Method: http.MethodGet,
  36. Path: "/working-pump/info",
  37. Handler: dtgateway.WorkingPumpHandler(serverCtx),
  38. },
  39. {
  40. Method: http.MethodGet,
  41. Path: "/working-valve/info",
  42. Handler: dtgateway.WorkingValveHandler(serverCtx),
  43. },
  44. {
  45. Method: http.MethodPost,
  46. Path: "/item-history/multi-add",
  47. Handler: dtgateway.ItemHistoryDataMultiAddHandler(serverCtx),
  48. },
  49. {
  50. Method: http.MethodGet,
  51. Path: "/item-history/list",
  52. Handler: dtgateway.ItemHistoryDataListHandler(serverCtx),
  53. },
  54. {
  55. Method: http.MethodGet,
  56. Path: "/item-history/info",
  57. Handler: dtgateway.ItemHistoryDataInfoHandler(serverCtx),
  58. },
  59. {
  60. Method: http.MethodGet,
  61. Path: "/item-history/max-min",
  62. Handler: dtgateway.ItemHistoryDataMaxMinHandler(serverCtx),
  63. },
  64. {
  65. Method: http.MethodGet,
  66. Path: "/item-history/first-last",
  67. Handler: dtgateway.ItemHistoryDataFirstLastHandler(serverCtx),
  68. },
  69. {
  70. Method: http.MethodGet,
  71. Path: "/item-change/info",
  72. Handler: dtgateway.ChangeTypeItemDataHandler(serverCtx),
  73. },
  74. {
  75. Method: http.MethodGet,
  76. Path: "/app/list",
  77. Handler: dtgateway.FindAppListHandler(serverCtx),
  78. },
  79. {
  80. Method: http.MethodGet,
  81. Path: "/app/info",
  82. Handler: dtgateway.GetAppInfoHandler(serverCtx),
  83. },
  84. {
  85. Method: http.MethodPost,
  86. Path: "/app/create",
  87. Handler: dtgateway.CreateAppInfoHandler(serverCtx),
  88. },
  89. {
  90. Method: http.MethodPost,
  91. Path: "/app/remove",
  92. Handler: dtgateway.RemoveAppInfoHandler(serverCtx),
  93. },
  94. {
  95. Method: http.MethodPost,
  96. Path: "/app/disable",
  97. Handler: dtgateway.DisableAppInfoHandler(serverCtx),
  98. },
  99. {
  100. Method: http.MethodPost,
  101. Path: "/app/enable",
  102. Handler: dtgateway.EnableAppInfoHandler(serverCtx),
  103. },
  104. {
  105. Method: http.MethodPost,
  106. Path: "/app/secret/reset",
  107. Handler: dtgateway.ResetAppSecretHandler(serverCtx),
  108. },
  109. {
  110. Method: http.MethodPost,
  111. Path: "/app/secret/expire",
  112. Handler: dtgateway.ExpireAppSecretHandler(serverCtx),
  113. },
  114. {
  115. Method: http.MethodPost,
  116. Path: "/app/project/reset",
  117. Handler: dtgateway.ResetAppProjectHandler(serverCtx),
  118. },
  119. }...,
  120. ),
  121. rest.WithPrefix("/api/dtgateway/v1"),
  122. )
  123. }