2021-05-25 15:47:40 +08:00
|
|
|
package ns
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
|
2021-05-27 17:09:53 +08:00
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/ns/domains"
|
2021-07-25 09:44:29 +08:00
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/ns/domains/keys"
|
2021-05-27 17:09:53 +08:00
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/ns/domains/records"
|
2021-08-05 16:08:18 +08:00
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/ns/settings"
|
2021-05-25 15:47:40 +08:00
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
|
|
|
|
|
"github.com/iwind/TeaGo"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
TeaGo.BeforeStart(func(server *TeaGo.Server) {
|
|
|
|
|
server.
|
|
|
|
|
Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeNS)).
|
|
|
|
|
Data("teaMenu", "ns").
|
|
|
|
|
Prefix("/ns").
|
|
|
|
|
Get("", new(IndexAction)).
|
|
|
|
|
|
2021-05-27 17:09:53 +08:00
|
|
|
// 域名相关
|
|
|
|
|
Prefix("/ns/domains").
|
|
|
|
|
GetPost("/create", new(domains.CreateAction)).
|
|
|
|
|
Post("/delete", new(domains.DeleteAction)).
|
|
|
|
|
Get("/domain", new(domains.DomainAction)).
|
|
|
|
|
GetPost("/update", new(domains.UpdateAction)).
|
2021-07-25 15:08:11 +08:00
|
|
|
GetPost("/tsig", new(domains.TsigAction)).
|
2021-05-27 17:09:53 +08:00
|
|
|
|
2021-07-25 09:44:29 +08:00
|
|
|
// 域名密钥
|
|
|
|
|
Prefix("/ns/domains/keys").
|
|
|
|
|
Get("", new(keys.IndexAction)).
|
|
|
|
|
GetPost("/createPopup", new(keys.CreatePopupAction)).
|
|
|
|
|
GetPost("/updatePopup", new(keys.UpdatePopupAction)).
|
|
|
|
|
Post("/delete", new(keys.DeleteAction)).
|
|
|
|
|
Post("/generateSecret", new(keys.GenerateSecretAction)).
|
|
|
|
|
|
2021-05-27 17:09:53 +08:00
|
|
|
// 记录相关
|
|
|
|
|
Prefix("/ns/domains/records").
|
|
|
|
|
Get("", new(records.IndexAction)).
|
|
|
|
|
GetPost("/createPopup", new(records.CreatePopupAction)).
|
|
|
|
|
GetPost("/updatePopup", new(records.UpdatePopupAction)).
|
|
|
|
|
Post("/delete", new(records.DeleteAction)).
|
|
|
|
|
|
2021-08-05 16:08:18 +08:00
|
|
|
// 设置
|
|
|
|
|
Prefix("/ns/settings").
|
|
|
|
|
Get("", new(settings.IndexAction)).
|
2021-05-25 15:47:40 +08:00
|
|
|
EndAll()
|
|
|
|
|
})
|
|
|
|
|
}
|