mirror of https://github.com/1Panel-dev/1Panel
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
717 B
26 lines
717 B
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)
|
|
}
|
|
}
|