Documentation
¶
Index ¶
- Variables
- func CheckCertificate(logger log.Logger, GlobalConfigPath string, acmeClient *restclient.Client)
- func CleanupCertificateFiles(logger log.Logger, interval time.Duration, GlobalConfigPath string, ...)
- func PullAndCheckCertificateFromRing(logger log.Logger, GlobalConfigPath string, acmeClient *restclient.Client)
- func WatchCertificateChange(logger log.Logger, interval time.Duration, configPath string, ...)
- func WatchCertificateEventChange(logger log.Logger, configPath string, acmeClient *restclient.Client)
- func WatchCertificateFromRing(logger log.Logger, interval time.Duration, configPath string, ...)
- type CertBackup
- type CertConfig
- type CertificateCollector
- type Common
- type Config
- type MapDiff
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Owner string GlobalConfig Config )
Functions ¶
func CheckCertificate ¶
func CheckCertificate(logger log.Logger, GlobalConfigPath string, acmeClient *restclient.Client)
func CleanupCertificateFiles ¶
func CleanupCertificateFiles(logger log.Logger, interval time.Duration, GlobalConfigPath string, acmeClient *restclient.Client)
CleanupCertificateFiles periodically checks and deletes local certificate files not found on the server
func PullAndCheckCertificateFromRing ¶
func PullAndCheckCertificateFromRing(logger log.Logger, GlobalConfigPath string, acmeClient *restclient.Client)
func WatchCertificateChange ¶
func WatchCertificateEventChange ¶
func WatchCertificateEventChange(logger log.Logger, configPath string, acmeClient *restclient.Client)
Types ¶
type CertBackup ¶
type CertBackup struct {
Cert string `json:"cert" example:"-----BEGIN CERTIFICATE-----\n..."`
Key string `json:"key" example:"-----BEGIN PRIVATE KEY-----\n..."`
}
func MapInterfaceToCertBackup ¶
func MapInterfaceToCertBackup(data map[string]interface{}) CertBackup
type CertConfig ¶
type CertConfig struct {
Domain string `yaml:"domain"`
Issuer string `yaml:"issuer"`
Bundle bool `yaml:"bundle,omitempty"`
San string `yaml:"san,omitempty"`
Days int32 `yaml:"days,omitempty"`
RenewalDays string `yaml:"renewal_days,omitempty"`
DNSChallenge string `yaml:"dns_challenge,omitempty"`
HTTPChallenge string `yaml:"http_challenge,omitempty"`
KeyType string `yaml:"key_type,omitempty"`
Labels string `yaml:"labels,omitempty"`
}
func (CertConfig) ToModelsCertificate ¶
func (cc CertConfig) ToModelsCertificate() models.Certificate
Convert to models.Certificate
type CertificateCollector ¶
type CertificateCollector struct{}
func NewCertificateCollector ¶
func NewCertificateCollector() *CertificateCollector
func (*CertificateCollector) Collect ¶
func (c *CertificateCollector) Collect(ch chan<- prometheus.Metric)
func (*CertificateCollector) Describe ¶
func (c *CertificateCollector) Describe(_ chan<- *prometheus.Desc)
type Common ¶
type Common struct {
CertDays int `yaml:"cert_days"`
CertDaysRenewal string `yaml:"cert_days_renewal"`
CertBackup bool `yaml:"certificate_backup"`
CertDeploy bool `yaml:"certificate_deploy"`
CertDir string `yaml:"certificate_dir"`
CertDirPerm fs.FileMode `yaml:"certificate_dir_perm"`
CertFilePerm fs.FileMode `yaml:"certificate_file_perm"`
CertKeyFilePerm fs.FileMode `yaml:"certificate_keyfile_perm"`
CertFileExt string `yaml:"certificate_file_ext"`
CertKeyFileExt string `yaml:"certificate_keyfile_ext"`
CertKeyFileNoGen bool `yaml:"certificate_keyfile_no_generate"`
CertTimeout int `yaml:"certificate_timeout"`
CmdEnabled bool `yaml:"cmd_enabled"`
PreCmdRun string `yaml:"pre_cmd_run"`
PreCmdTimeout int `yaml:"pre_cmd_timeout"`
PostCmdRun string `yaml:"post_cmd_run"`
PostCmdTimeout int `yaml:"post_cmd_timeout"`
RevokeOnUpdate bool `yaml:"revoke_on_update"`
RevokeOnDelete bool `yaml:"revoke_on_delete"`
DelayBeforeDelete string `yaml:"delay_before_delete"`
}
Common represents common config.
type Config ¶
type Config struct {
Common Common `yaml:"common"`
Certificate []CertConfig `yaml:"certificate"`
Storage cfg.Storage `yaml:"storage"`
}
Config represents certificate config.
func (*Config) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface.
type MapDiff ¶
type MapDiff struct {
Create []models.Certificate `json:"create"`
Update []models.Certificate `json:"update"`
Delete []models.Certificate `json:"delete"`
}
Click to show internal directories.
Click to hide internal directories.