Documentation ¶ Index ¶ Variables func NewTLSConfig(opts ...Option) (*tls.Config, error) type Option func WithCA(caPath string) Option func WithCertAndKey(certPath, keyPath string) Option func WithCertPool(pool *x509.CertPool) Option func WithMinVersion(minVersion uint16) Option Constants ¶ This section is empty. Variables ¶ View Source var ( ErrCertificatesLoading = errors.New("cert and key could not be loaded") ErrCaLoading = errors.New("ca could not be loaded") ErrFailedToAppendCACert = errors.New("failed to append CA certificate to the pool") ) Functions ¶ func NewTLSConfig ¶ func NewTLSConfig(opts ...Option) (*tls.Config, error) Types ¶ type Option ¶ type Option func(*tls.Config) error func WithCA ¶ func WithCA(caPath string) Option func WithCertAndKey ¶ func WithCertAndKey(certPath, keyPath string) Option func WithCertPool ¶ func WithCertPool(pool *x509.CertPool) Option func WithMinVersion ¶ func WithMinVersion(minVersion uint16) Option Source Files ¶ View all Source files tlsconfig.go Click to show internal directories. Click to hide internal directories.