-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinterfaces.go
More file actions
27 lines (24 loc) · 898 Bytes
/
interfaces.go
File metadata and controls
27 lines (24 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package proxy
import (
"github.com/flatrun/agent/internal/ssl"
"github.com/flatrun/agent/pkg/models"
)
type NginxManager interface {
CreateVirtualHost(deployment *models.Deployment) error
UpdateVirtualHost(deployment *models.Deployment) error
DeleteVirtualHost(deploymentName string) error
VirtualHostExists(deploymentName string) bool
GetVirtualHost(deploymentName string) (string, error)
WriteVirtualHost(deploymentName string, content string) error
TestConfig() error
Reload() error
}
type SSLManager interface {
ValidateDomain(domain string) error
CertificateExists(domain string) bool
RequestCertificate(domain string) (*ssl.CertificateResult, error)
GetCertificate(domain string) (*models.Certificate, error)
RenewCertificates() (*ssl.RenewalResult, error)
ListCertificates() ([]models.Certificate, error)
GetExpiringCertificates(days int) ([]models.Certificate, error)
}