2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 16:10:59 +08:00
Files
panel/internal/plugin/openresty/init.go
2024-09-18 02:25:24 +08:00

32 lines
891 B
Go

package openresty
import (
"github.com/go-chi/chi/v5"
"github.com/TheTNB/panel/pkg/pluginloader"
"github.com/TheTNB/panel/pkg/types"
)
func init() {
pluginloader.Register(&types.Plugin{
Order: -100,
Slug: "openresty",
Name: "OpenResty",
Description: "OpenResty® 是一款基于 NGINX 和 LuaJIT 的 Web 平台",
Version: "1.25.3.1",
Requires: []string{},
Excludes: []string{},
Install: "bash /www/panel/scripts/openresty/install.sh",
Uninstall: "bash /www/panel/scripts/openresty/uninstall.sh",
Update: "bash /www/panel/scripts/openresty/install.sh",
Route: func(r chi.Router) {
service := NewService()
r.Get("/load", service.Load)
r.Get("/config", service.GetConfig)
r.Post("/config", service.SaveConfig)
r.Get("/errorLog", service.ErrorLog)
r.Post("/clearErrorLog", service.ClearErrorLog)
},
})
}