Documentation
¶
Index ¶
- type Cert
- type CertOpt
- func WithCASubject(organization, commonName string) CertOpt
- func WithCombinedFile() CertOpt
- func WithDNSName(dnsName string) CertOpt
- func WithIPAddr(ipAddr net.IP) CertOpt
- func WithNoDefaultIPAddrs() CertOpt
- func WithNotAfter(notAfter time.Time) CertOpt
- func WithNotBefore(notBefore time.Time) CertOpt
- type CertOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cert ¶
type Cert struct {
// Path to the SSL certificates.
CACertPath, CertPath string
// Path to the private keys for the SSL certificates.
CAKeyPath, KeyPath string
}
func (*Cert) ClientTLSConfig ¶
type CertOpt ¶
type CertOpt func(*CertOptions)
func WithCASubject ¶
func WithCombinedFile ¶
func WithCombinedFile() CertOpt
func WithDNSName ¶
func WithIPAddr ¶
func WithNoDefaultIPAddrs ¶
func WithNoDefaultIPAddrs() CertOpt
func WithNotAfter ¶
func WithNotBefore ¶
type CertOptions ¶
type CertOptions struct {
// DNSNames for cert
DNSNames []string
// IP Addresses for cert
IPAddrs []net.IP
// SkipDefaultIPAddrs indicates if the default IPAddrs should be skipped if IPAddrs is not set.
SkipDefaultIPAddrs bool
// NotBefore for certificate
NotBefore time.Time
// NotAfter for certificate
NotAfter time.Time
// CombinedFile indicates if the certificate and key should be combined into a single file
CombinedFile bool
// CAOrganization sets the CA certificate's Subject.Organization field
CAOrganization string
// CACommonName sets the CA certificate's Subject.CommonName field
CACommonName string
}
Click to show internal directories.
Click to hide internal directories.