mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-13 03:15:48 +02:00
refactor: refactor app and api
This commit is contained in:
parent
5ab50b8a93
commit
287ef7527d
157 changed files with 8116 additions and 3587 deletions
26
api/sites/sites.go
Normal file
26
api/sites/sites.go
Normal file
|
@ -0,0 +1,26 @@
|
|||
package sites
|
||||
|
||||
import (
|
||||
"github.com/0xJacky/Nginx-UI/internal/nginx"
|
||||
"github.com/sashabaranov/go-openai"
|
||||
"time"
|
||||
)
|
||||
|
||||
type CertificateInfo struct {
|
||||
SubjectName string `json:"subject_name"`
|
||||
IssuerName string `json:"issuer_name"`
|
||||
NotAfter time.Time `json:"not_after"`
|
||||
NotBefore time.Time `json:"not_before"`
|
||||
}
|
||||
|
||||
type Site struct {
|
||||
ModifiedAt time.Time `json:"modified_at"`
|
||||
Advanced bool `json:"advanced"`
|
||||
Enabled bool `json:"enabled"`
|
||||
Name string `json:"name"`
|
||||
Config string `json:"config"`
|
||||
AutoCert bool `json:"auto_cert"`
|
||||
ChatGPTMessages []openai.ChatCompletionMessage `json:"chatgpt_messages,omitempty"`
|
||||
Tokenized *nginx.NgxConfig `json:"tokenized,omitempty"`
|
||||
CertInfo map[int]CertificateInfo `json:"cert_info,omitempty"`
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue