版本封存
This commit is contained in:
@@ -21,16 +21,25 @@ func SetupRouter() *gin.Engine {
|
||||
auth := api.Group("/authorization")
|
||||
{
|
||||
authController := controllers.NewAuthController()
|
||||
auth.POST("/generate", authController.GenerateAuthFile) // 授权文件生成
|
||||
auth.POST("/code", authController.ReceiveAuthCode) // 授权码接收
|
||||
auth.POST("/notify", authController.NotifyAuthInfo) // 授权信息通知
|
||||
auth.GET("/generate", authController.GenerateAuthFile) // 授权文件生成
|
||||
auth.POST("/auth", authController.ReceiveAuthCode) // 授权码接收
|
||||
auth.POST("/info", authController.NotifyAuthInfo) // 授权信息通知
|
||||
auth.GET("/hosts", authController.GetAllAuthorizedHosts) // 获取所有已授权主机信息
|
||||
}
|
||||
|
||||
// 心跳检测路由
|
||||
heartbeat := api.Group("/heartbeat")
|
||||
{
|
||||
heartbeatController := controllers.NewHeartbeatController()
|
||||
heartbeat.POST("", heartbeatController.HandleHeartbeat) // 心跳检测
|
||||
heartbeat.POST("", heartbeatController.HandleHeartbeat) // 心跳检测
|
||||
heartbeat.GET("/hosts", heartbeatController.GetAllHeartbeatHosts) // 获取所有心跳主机信息
|
||||
}
|
||||
|
||||
// 暴露CMII的接口
|
||||
cmii := api.Group("/cmii")
|
||||
{
|
||||
cmiiController := controllers.NewCMIIController()
|
||||
cmii.POST("/host/info/all", cmiiController.HandleHostInfo) // 处理主机信息
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user