mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-16 15:26:40 +00:00
29 lines
752 B
Go
29 lines
752 B
Go
package certmanager
|
|
|
|
import (
|
|
"context"
|
|
"crypto/tls"
|
|
"net/http"
|
|
)
|
|
|
|
// Manager defines the interface for certificate management
|
|
type Manager interface {
|
|
// IsEnabled returns whether certificate management is enabled
|
|
IsEnabled() bool
|
|
|
|
// AddDomain adds a domain to the allowed hosts list
|
|
AddDomain(domain string)
|
|
|
|
// RemoveDomain removes a domain from the allowed hosts list
|
|
RemoveDomain(domain string)
|
|
|
|
// IssueCertificate eagerly issues a certificate for a domain
|
|
IssueCertificate(ctx context.Context, domain string) error
|
|
|
|
// TLSConfig returns the TLS configuration for the HTTPS server
|
|
TLSConfig() *tls.Config
|
|
|
|
// HTTPHandler returns the HTTP handler for ACME challenges (or fallback)
|
|
HTTPHandler(fallback http.Handler) http.Handler
|
|
}
|