mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-12-21 13:17:48 +08:00
26 lines
717 B
Go
26 lines
717 B
Go
|
package router
|
||
|
|
||
|
import (
|
||
|
v2 "github.com/1Panel-dev/1Panel/core/app/api/v2"
|
||
|
"github.com/gin-gonic/gin"
|
||
|
)
|
||
|
|
||
|
type HostRouter struct{}
|
||
|
|
||
|
func (s *HostRouter) InitRouter(Router *gin.RouterGroup) {
|
||
|
hostRouter := Router.Group("hosts")
|
||
|
baseApi := v2.ApiGroupApp.BaseApi
|
||
|
{
|
||
|
hostRouter.POST("", baseApi.CreateHost)
|
||
|
hostRouter.POST("/del", baseApi.DeleteHost)
|
||
|
hostRouter.POST("/update", baseApi.UpdateHost)
|
||
|
hostRouter.POST("/update/group", baseApi.UpdateHostGroup)
|
||
|
hostRouter.POST("/search", baseApi.SearchHost)
|
||
|
hostRouter.POST("/tree", baseApi.HostTree)
|
||
|
hostRouter.POST("/test/byinfo", baseApi.TestByInfo)
|
||
|
hostRouter.POST("/test/byid/:id", baseApi.TestByID)
|
||
|
|
||
|
hostRouter.GET("/terminal", baseApi.WsSsh)
|
||
|
}
|
||
|
}
|