-
Notifications
You must be signed in to change notification settings - Fork 5
/
init.go
65 lines (59 loc) · 2.29 KB
/
init.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package dns
import (
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/dns/clusters"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/dns/domains"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/dns/issues"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/dns/providers"
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
"github.com/iwind/TeaGo"
)
func init() {
TeaGo.BeforeStart(func(server *TeaGo.Server) {
server.
Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeDNS)).
Helper(new(Helper)).
Prefix("/dns").
Data("teaSubMenu", "cluster").
Get("", new(IndexAction)).
GetPost("/updateClusterPopup", new(UpdateClusterPopupAction)).
Post("/providerOptions", new(ProviderOptionsAction)).
Post("/domainOptions", new(DomainOptionsAction)).
// 集群
Prefix("/dns/clusters").
Get("/cluster", new(clusters.ClusterAction)).
Post("/sync", new(clusters.SyncAction)).
// 服务商
Prefix("/dns/providers").
Data("teaSubMenu", "provider").
Get("", new(providers.IndexAction)).
GetPost("/createPopup", new(providers.CreatePopupAction)).
GetPost("/updatePopup", new(providers.UpdatePopupAction)).
Post("/delete", new(providers.DeleteAction)).
Get("/provider", new(providers.ProviderAction)).
Post("/syncDomains", new(providers.SyncDomainsAction)).
EndData().
// 域名
Prefix("/dns/domains").
Data("teaSubMenu", "provider").
GetPost("/createPopup", new(domains.CreatePopupAction)).
GetPost("/updatePopup", new(domains.UpdatePopupAction)).
Post("/delete", new(domains.DeleteAction)).
Post("/recover", new(domains.RecoverAction)).
Post("/sync", new(domains.SyncAction)).
Get("/routesPopup", new(domains.RoutesPopupAction)).
GetPost("/selectPopup", new(domains.SelectPopupAction)).
Get("/clustersPopup", new(domains.ClustersPopupAction)).
Get("/nodesPopup", new(domains.NodesPopupAction)).
Get("/serversPopup", new(domains.ServersPopupAction)).
EndData().
// 问题修复
Prefix("/dns/issues").
Data("teaSubMenu", "issue").
GetPost("", new(issues.IndexAction)).
GetPost("/updateNodePopup", new(issues.UpdateNodePopupAction)).
Post("/syncDomain", new(issues.SyncDomainAction)).
EndData().
EndAll()
})
}