Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MTLSConfig ¶
type MTLSConfig int
MTLSConfig is a type to support the Client/Server mode iota
const ( Client MTLSConfig = iota // Client-mode Mutual TLS Server // Server-mode Mutual TLS )
type X509Files ¶
type X509Files struct { CertificateFile string KeyFile string CertificateAuthorityFile string Fs afero.Fs }
X509Files is a struct to hold the paths to the certificate, key, and certificate authority files
func NewX509Files ¶
func NewX509Files(certificateFile string, keyFile string, certificateAuthorityFile string, options ...X509FilesOption) *X509Files
NewX509Files creates a new X509Files struct, with file-paths for the certificate, key, and certificate authority
func (*X509Files) GenerateTransportCredentials ¶
func (x509Files *X509Files) GenerateTransportCredentials(mtlsConfig MTLSConfig) (credentials.TransportCredentials, error)
GenerateTransportCredentials generates the TransportCredentials for the given MTLSConfig
type X509FilesOption ¶
type X509FilesOption func(*X509Files)
X509FilesOption is a type to support the functional options pattern
func WithFilesystem ¶
func WithFilesystem(fs afero.Fs) X509FilesOption
WithFilesystem is an option to set the underlying filesystem for loading the x509 files
Click to show internal directories.
Click to hide internal directories.