Documentation
¶
Index ¶
- func CopyCertificates(certPath, keyPath, destDir string) error
- func FormatCertificateInfo(certPath string) (string, error)
- func GetCertificateDaysRemaining(certPath string) (int, error)
- func GetCertificateDomains(certPath string) ([]string, error)
- func GetCertificateExpiry(certPath string) (time.Time, error)
- func IsCertificateExpiringSoon(certPath string, days int) (bool, error)
- func ValidateCertificate(certPath string) error
- type Manager
- func (m *Manager) CertificatesExist() bool
- func (m *Manager) GenerateCertificates() error
- func (m *Manager) GetCALocation() (string, error)
- func (m *Manager) GetCertInfo() (map[string]interface{}, error)
- func (m *Manager) GetCertificatePath() string
- func (m *Manager) GetKeyPath() string
- func (m *Manager) InstallCA() error
- func (m *Manager) InstallMkcert() error
- func (m *Manager) IsCAInstalled() (bool, error)
- func (m *Manager) IsMkcertInstalled() bool
- func (m *Manager) RegenerateCertificates() error
- func (m *Manager) UninstallCA() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyCertificates ¶
CopyCertificates copies certificate files to a destination directory
func FormatCertificateInfo ¶
FormatCertificateInfo formats certificate information for display
func GetCertificateDaysRemaining ¶
GetCertificateDaysRemaining returns the number of days until certificate expires
func GetCertificateDomains ¶
GetCertificateDomains returns the domains covered by the certificate
func GetCertificateExpiry ¶
GetCertificateExpiry returns the expiration date of a certificate
func IsCertificateExpiringSoon ¶
IsCertificateExpiringSoon checks if certificate expires within the given days
func ValidateCertificate ¶
ValidateCertificate validates a certificate file
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles certificate generation with mkcert
func NewManager ¶
NewManager creates a new certificate manager
func (*Manager) CertificatesExist ¶
CertificatesExist checks if certificates have been generated
func (*Manager) GenerateCertificates ¶
GenerateCertificates generates SSL certificates for the domain
func (*Manager) GetCALocation ¶
GetCALocation returns the path to the mkcert CA root certificate
func (*Manager) GetCertInfo ¶
GetCertInfo returns information about the generated certificates
func (*Manager) GetCertificatePath ¶
GetCertificatePath returns the path to the generated certificate
func (*Manager) GetKeyPath ¶
GetKeyPath returns the path to the generated private key
func (*Manager) InstallMkcert ¶
InstallMkcert attempts to install mkcert
func (*Manager) IsCAInstalled ¶
IsCAInstalled checks if the mkcert CA is installed
func (*Manager) IsMkcertInstalled ¶
IsMkcertInstalled checks if mkcert is installed on the system
func (*Manager) RegenerateCertificates ¶
RegenerateCertificates removes old certificates and generates new ones
func (*Manager) UninstallCA ¶
UninstallCA removes the mkcert CA from system trust stores