实现对ACME用户的增删改

This commit is contained in:
刘祥超
2020-11-24 17:36:42 +08:00
parent 169fe50a21
commit 3ba0d58cb8
84 changed files with 497 additions and 174 deletions

View File

@@ -0,0 +1,35 @@
package certs
import (
"github.com/iwind/TeaGo/actions"
"github.com/iwind/TeaGo/maps"
"net/http"
)
type Helper struct {
}
func NewHelper() *Helper {
return &Helper{}
}
func (this *Helper) BeforeAction(action *actions.ActionObject) {
if action.Request.Method != http.MethodGet {
return
}
action.Data["teaMenu"] = "servers"
action.Data["leftMenuItems"] = []maps.Map{
{
"name": "证书",
"url": "/servers/certs",
"isActive": action.Data.GetString("leftMenuItem") == "cert",
},
{
"name": "免费证书",
"url": "/servers/certs/acme",
"isActive": action.Data.GetString("leftMenuItem") == "acme",
},
}
}