Documentation
¶
Index ¶
- Constants
- type CertificateAuthentication
- func (ca *CertificateAuthentication) GetClientCertificate() string
- func (ca *CertificateAuthentication) GetTrustedCertificates() string
- func (ca *CertificateAuthentication) TrustAnyCertificate() bool
- func (ca *CertificateAuthentication) UseClientCertificate() bool
- func (ca *CertificateAuthentication) UseTrustedCertificates() bool
- type CertificateAuthenticationOption
- type TLSConfigurationProvider
Constants ¶
View Source
const ( BASE64_ENCODING_PATTERN = "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$" PEM_CERTIFICATE_BLOCK_TYPE = "CERTIFICATE" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertificateAuthentication ¶
type CertificateAuthentication struct {
// contains filtered or unexported fields
}
func NewCertAuthentication ¶
func NewCertAuthentication(opts ...CertificateAuthenticationOption) *CertificateAuthentication
func (*CertificateAuthentication) GetClientCertificate ¶
func (ca *CertificateAuthentication) GetClientCertificate() string
func (*CertificateAuthentication) GetTrustedCertificates ¶
func (ca *CertificateAuthentication) GetTrustedCertificates() string
func (*CertificateAuthentication) TrustAnyCertificate ¶
func (ca *CertificateAuthentication) TrustAnyCertificate() bool
func (*CertificateAuthentication) UseClientCertificate ¶
func (ca *CertificateAuthentication) UseClientCertificate() bool
func (*CertificateAuthentication) UseTrustedCertificates ¶
func (ca *CertificateAuthentication) UseTrustedCertificates() bool
type CertificateAuthenticationOption ¶
type CertificateAuthenticationOption func(*CertificateAuthentication)
func TrustAnyCertificate ¶
func TrustAnyCertificate(trustAnyCert bool) CertificateAuthenticationOption
func TrustCertificates ¶
func TrustCertificates(trustedCerts string) CertificateAuthenticationOption
func WithClientCertificate ¶
func WithClientCertificate(clientCert string) CertificateAuthenticationOption
type TLSConfigurationProvider ¶
type TLSConfigurationProvider struct { *CertificateAuthentication // contains filtered or unexported fields }
func NewTLSConfigurationProvider ¶
func NewTLSConfigurationProvider(certAuth *CertificateAuthentication) *TLSConfigurationProvider
func (*TLSConfigurationProvider) CreateTransport ¶
func (p *TLSConfigurationProvider) CreateTransport() (http.RoundTripper, error)
Click to show internal directories.
Click to hide internal directories.