mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
feat: add certificate expiration notifications #387
This commit is contained in:
parent
7a0972495f
commit
1512e1de85
21 changed files with 1616 additions and 1235 deletions
|
@ -1,13 +1,14 @@
|
|||
package model
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/0xJacky/Nginx-UI/internal/helper"
|
||||
"github.com/0xJacky/Nginx-UI/internal/nginx"
|
||||
"github.com/go-acme/lego/v4/certcrypto"
|
||||
"github.com/go-acme/lego/v4/certificate"
|
||||
"github.com/lib/pq"
|
||||
"gorm.io/gorm/clause"
|
||||
"os"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -128,3 +129,12 @@ func (c *CertificateResource) GetResource() certificate.Resource {
|
|||
CSR: c.CSR,
|
||||
}
|
||||
}
|
||||
|
||||
// GetCertList returns all certificates
|
||||
func GetCertList() (c []*Cert) {
|
||||
if db == nil {
|
||||
return
|
||||
}
|
||||
db.Find(&c)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue