2020-09-13 20:37:07 +08:00
|
|
|
package db
|
|
|
|
|
|
|
|
|
|
import (
|
2020-12-03 11:03:12 +08:00
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
|
2020-10-10 20:28:36 +08:00
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/settings/settingutils"
|
2020-09-13 20:37:07 +08:00
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
|
|
|
|
|
"github.com/iwind/TeaGo"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
TeaGo.BeforeStart(func(server *TeaGo.Server) {
|
|
|
|
|
server.
|
2020-12-03 11:03:12 +08:00
|
|
|
Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeSetting)).
|
2020-09-13 20:37:07 +08:00
|
|
|
Helper(new(Helper)).
|
2020-12-14 21:24:21 +08:00
|
|
|
Helper(settingutils.NewAdvancedHelper("dbNodes")).
|
2020-09-13 20:37:07 +08:00
|
|
|
Prefix("/db").
|
|
|
|
|
Get("", new(IndexAction)).
|
2020-10-08 17:54:57 +08:00
|
|
|
GetPost("/createPopup", new(CreatePopupAction)).
|
2021-08-30 10:56:03 +08:00
|
|
|
GetPost("/update", new(UpdateAction)).
|
2020-10-08 17:54:57 +08:00
|
|
|
Post("/delete", new(DeleteAction)).
|
2021-08-30 10:56:03 +08:00
|
|
|
GetPost("/clean", new(CleanAction)).
|
2021-01-19 22:05:46 +08:00
|
|
|
Post("/deleteTable", new(DeleteTableAction)).
|
|
|
|
|
Post("/truncateTable", new(TruncateTableAction)).
|
2021-08-30 10:56:03 +08:00
|
|
|
Get("/node", new(NodeAction)).
|
|
|
|
|
Get("/logs", new(LogsAction)).
|
|
|
|
|
Post("/status", new(StatusAction)).
|
2020-09-13 20:37:07 +08:00
|
|
|
EndAll()
|
|
|
|
|
})
|
|
|
|
|
}
|