mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-04 08:20:25 +08:00
32 lines
778 B
Go
32 lines
778 B
Go
package router
|
|
|
|
import (
|
|
"mayfly-go/internal/common/api"
|
|
dbapp "mayfly-go/internal/db/application"
|
|
machineapp "mayfly-go/internal/machine/application"
|
|
mongoapp "mayfly-go/internal/mongo/application"
|
|
redisapp "mayfly-go/internal/redis/application"
|
|
tagapp "mayfly-go/internal/tag/application"
|
|
"mayfly-go/pkg/req"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func InitIndexRouter(router *gin.RouterGroup) {
|
|
index := router.Group("common/index")
|
|
i := &api.Index{
|
|
TagApp: tagapp.GetTagTreeApp(),
|
|
MachineApp: machineapp.GetMachineApp(),
|
|
DbApp: dbapp.GetDbApp(),
|
|
RedisApp: redisapp.GetRedisApp(),
|
|
MongoApp: mongoapp.GetMongoApp(),
|
|
}
|
|
{
|
|
// 首页基本信息统计
|
|
index.GET("count", func(g *gin.Context) {
|
|
req.NewCtxWithGin(g).
|
|
Handle(i.Count)
|
|
})
|
|
}
|
|
}
|