Documentation ¶
Index ¶
- Variables
- func AppendCertsFromPEM(s *x509.CertPool, pemCerts []byte) error
- func Check(key []byte, cert []byte, cacert []byte, duration time.Duration, name ...string) (bool, error)
- func CheckInfo(info CertificateInfo, duration time.Duration, name ...string) (bool, error)
- func Equal(a CertificateInfo, b CertificateInfo) bool
- func GetCertificate(info CertificateInfo) (tls.Certificate, error)
- func IsValid(key []byte, cert []byte, cacert []byte, duration time.Duration, name ...string) bool
- func IsValidInfo(info CertificateInfo, duration time.Duration, name ...string) bool
- func NewSignedCert(cfg *cert.Config, key crypto.Signer, caCert *x509.Certificate, ...) (*x509.Certificate, error)
- type CertificateAccess
- type CertificateHosts
- type CertificateInfo
- func GetCertificateInfo(logger logger.LogContext, access CertificateAccess, cfg *Config) (CertificateInfo, error)
- func LoadCertInfo(certFile, keyFile, caFile, cakeyFile string) (CertificateInfo, error)
- func NewCertInfo(cert []byte, key []byte, cacert []byte, cakey []byte) CertificateInfo
- func UpdateCertificate(old CertificateInfo, cfg *Config) (CertificateInfo, error)
- type CompoundHosts
- type Config
- type DNSName
- type IP
- type NoHost
- type ServiceHosts
Constants ¶
This section is empty.
Variables ¶
View Source
var ClusterDomain = "cluster.local"
Functions ¶
func Equal ¶
func Equal(a CertificateInfo, b CertificateInfo) bool
func GetCertificate ¶
func GetCertificate(info CertificateInfo) (tls.Certificate, error)
func IsValidInfo ¶
func IsValidInfo(info CertificateInfo, duration time.Duration, name ...string) bool
func NewSignedCert ¶
func NewSignedCert(cfg *cert.Config, key crypto.Signer, caCert *x509.Certificate, caKey crypto.Signer, duration time.Duration) (*x509.Certificate, error)
NewSignedCert creates a signed certificate using the given CA certificate and key with the given validity duration
Types ¶
type CertificateAccess ¶
type CertificateAccess interface { Get(logger.LogContext) (CertificateInfo, error) Set(logger.LogContext, CertificateInfo) error }
type CertificateHosts ¶
type CertificateInfo ¶
func GetCertificateInfo ¶
func GetCertificateInfo(logger logger.LogContext, access CertificateAccess, cfg *Config) (CertificateInfo, error)
func LoadCertInfo ¶
func LoadCertInfo(certFile, keyFile, caFile, cakeyFile string) (CertificateInfo, error)
func NewCertInfo ¶
func NewCertInfo(cert []byte, key []byte, cacert []byte, cakey []byte) CertificateInfo
func UpdateCertificate ¶
func UpdateCertificate(old CertificateInfo, cfg *Config) (CertificateInfo, error)
type CompoundHosts ¶
type CompoundHosts []CertificateHosts
func NewCompoundHosts ¶
func NewCompoundHosts(hosts ...CertificateHosts) CompoundHosts
func (*CompoundHosts) Add ¶
func (this *CompoundHosts) Add(hosts ...CertificateHosts) *CompoundHosts
func (CompoundHosts) GetDNSNames ¶
func (this CompoundHosts) GetDNSNames() []string
func (CompoundHosts) GetIPs ¶
func (this CompoundHosts) GetIPs() []net.IP
func (CompoundHosts) With ¶
func (this CompoundHosts) With(hosts ...CertificateHosts) CompoundHosts
type DNSName ¶
type DNSName struct { NoHost // contains filtered or unexported fields }
func NewDNSName ¶
func (*DNSName) GetDNSNames ¶
type ServiceHosts ¶
type ServiceHosts struct { NoHost // contains filtered or unexported fields }
func NewServiceHosts ¶
func NewServiceHosts(name, namespace string) *ServiceHosts
func (*ServiceHosts) GetDNSNames ¶
func (this *ServiceHosts) GetDNSNames() []string
func (*ServiceHosts) GetName ¶
func (this *ServiceHosts) GetName() string
func (*ServiceHosts) GetNamespace ¶
func (this *ServiceHosts) GetNamespace() string
Click to show internal directories.
Click to hide internal directories.