chore: 并入 iotlcm-openapi 历史到 openapi/(原提交 3b05d5a)

This commit is contained in:
MiFaZhan
2026-11-02 13:28:02 +08:00
484 changed files with 34732 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
package router
import (
"context"
"git.5iot.com/iotlcm-public/iotlcm-openapi/internal/controller/common"
"github.com/gogf/gf/v2/net/ghttp"
)
func Change(ctx context.Context, group *ghttp.RouterGroup) {
group.Group("/change", func(group *ghttp.RouterGroup) {
group.Bind(common.NewV1())
})
}
+15
View File
@@ -0,0 +1,15 @@
package router
import (
"context"
"git.5iot.com/iotlcm-public/iotlcm-openapi/internal/controller/old_api"
"github.com/gogf/gf/v2/net/ghttp"
)
func Route(ctx context.Context, group *ghttp.RouterGroup) {
group.Group("/open", func(group *ghttp.RouterGroup) {
group.Bind(old_api.NewV1())
})
}
+15
View File
@@ -0,0 +1,15 @@
package router
import (
"context"
"git.5iot.com/iotlcm-public/iotlcm-openapi/internal/controller/query"
"github.com/gogf/gf/v2/net/ghttp"
)
func Query(ctx context.Context, group *ghttp.RouterGroup) {
group.Group("/query", func(group *ghttp.RouterGroup) {
group.Bind(query.NewV1())
})
}
+30
View File
@@ -0,0 +1,30 @@
package router
import (
"context"
"git.5iot.com/iotlcm-public/iotlcm-openapi/internal/service"
"github.com/gogf/gf/v2/net/ghttp"
)
func InitRouter(ctx context.Context, s *ghttp.Server) {
s.Group("/openapi/v3", func(group *ghttp.RouterGroup) {
group.Middleware(
service.Middleware().ApiCtx,
service.Middleware().ApiAuth,
service.Middleware().ResponseHandler,
)
Change(ctx, group)
Query(ctx, group)
})
s.Group("/route", func(group *ghttp.RouterGroup) {
group.Middleware(
service.Middleware().OldCtx,
service.Middleware().OldAuth,
service.Middleware().OldResponseHandler,
)
Route(ctx, group)
})
}