2020-09-13 20:37:07 +08:00
|
|
|
package cache
|
|
|
|
|
|
|
|
|
|
import (
|
2020-12-03 11:03:12 +08:00
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
|
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.AdminModuleCodeServer)).
|
2020-09-13 20:37:07 +08:00
|
|
|
Helper(NewHelper()).
|
2020-11-27 15:18:32 +08:00
|
|
|
Data("teaMenu", "servers").
|
|
|
|
|
Data("teaSubMenu", "cache").
|
2020-09-13 20:37:07 +08:00
|
|
|
Prefix("/servers/components/cache").
|
|
|
|
|
Get("", new(IndexAction)).
|
2020-10-02 17:22:24 +08:00
|
|
|
GetPost("/createPopup", new(CreatePopupAction)).
|
|
|
|
|
Get("/policy", new(PolicyAction)).
|
2020-10-04 14:27:05 +08:00
|
|
|
GetPost("/update", new(UpdateAction)).
|
2020-10-02 17:22:24 +08:00
|
|
|
GetPost("/clean", new(CleanAction)).
|
|
|
|
|
GetPost("/preheat", new(PreheatAction)).
|
|
|
|
|
GetPost("/purge", new(PurgeAction)).
|
|
|
|
|
GetPost("/stat", new(StatAction)).
|
|
|
|
|
GetPost("/test", new(TestAction)).
|
|
|
|
|
Post("/delete", new(DeleteAction)).
|
2020-10-04 14:27:05 +08:00
|
|
|
Post("/testRead", new(TestReadAction)).
|
|
|
|
|
Post("/testWrite", new(TestWriteAction)).
|
2020-12-17 15:50:44 +08:00
|
|
|
Get("/selectPopup", new(SelectPopupAction)).
|
|
|
|
|
Post("/count", new(CountAction)).
|
|
|
|
|
|
2020-09-13 20:37:07 +08:00
|
|
|
EndAll()
|
|
|
|
|
})
|
|
|
|
|
}
|