feat: using renewal api to renew certificate #319

This commit is contained in:
Jacky 2024-04-30 19:48:48 +08:00
parent e3876cffaf
commit e16b077d20
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
11 changed files with 173 additions and 71 deletions

View file

@ -6,14 +6,17 @@ import (
"github.com/0xJacky/Nginx-UI/model"
"github.com/0xJacky/Nginx-UI/query"
"github.com/go-acme/lego/v4/certcrypto"
"time"
)
type ConfigPayload struct {
ServerName []string `json:"server_name"`
ChallengeMethod string `json:"challenge_method"`
DNSCredentialID int `json:"dns_credential_id"`
ACMEUserID int `json:"acme_user_id"`
KeyType certcrypto.KeyType `json:"key_type"`
ServerName []string `json:"server_name"`
ChallengeMethod string `json:"challenge_method"`
DNSCredentialID int `json:"dns_credential_id"`
ACMEUserID int `json:"acme_user_id"`
KeyType certcrypto.KeyType `json:"key_type"`
Resource *model.CertificateResource `json:"resource,omitempty"`
NotBefore time.Time
}
func (c *ConfigPayload) GetACMEUser() (user *model.AcmeUser, err error) {