Files
EdgeAdmin/internal/web/actions/default/clusters/cluster/init.go

40 lines
1.4 KiB
Go
Raw Normal View History

2020-09-06 16:19:34 +08:00
package cluster
import (
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/node"
clusters "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/clusterutils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
"github.com/iwind/TeaGo"
)
func init() {
TeaGo.BeforeStart(func(server *TeaGo.Server) {
server.
Helper(helpers.NewUserMustAuth()).
Helper(clusters.NewClusterHelper()).
Prefix("/clusters/cluster").
Get("", new(IndexAction)).
GetPost("/installNodes", new(InstallNodesAction)).
GetPost("/installRemote", new(InstallRemoteAction)).
Post("/installStatus", new(InstallStatusAction)).
2020-10-28 12:35:49 +08:00
GetPost("/upgradeRemote", new(UpgradeRemoteAction)).
Post("/upgradeStatus", new(UpgradeStatusAction)).
2020-10-25 19:45:42 +08:00
GetPost("/delete", new(DeleteAction)).
GetPost("/createNode", new(CreateNodeAction)).
GetPost("/createBatch", new(CreateBatchAction)).
GetPost("/updateNodeSSH", new(UpdateNodeSSHAction)).
2020-10-28 12:47:24 +08:00
GetPost("/installManual", new(InstallManualAction)).
2020-09-06 16:19:34 +08:00
// 节点相关
Get("/node", new(node.NodeAction)).
GetPost("/node/update", new(node.UpdateAction)).
GetPost("/node/install", new(node.InstallAction)).
Post("/node/updateInstallStatus", new(node.UpdateInstallStatusAction)).
2020-09-13 20:37:07 +08:00
Post("/node/status", new(node.StatusAction)).
2020-10-09 11:07:01 +08:00
Get("/node/logs", new(node.LogsAction)).
Post("/node/start", new(node.StartAction)).
Post("/node/stop", new(node.StopAction)).
2020-09-06 16:19:34 +08:00
EndAll()
})
}