Documentation ¶
Overview ¶
Package tlsgo provides a mgo connection using Go's native TLS library.
Package tlsgo implements connection to MongoDB with Go native TLS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TLSConfig ¶
type TLSConfig struct {
// contains filtered or unexported fields
}
TLSConfig contains options for configuring an SSL connection to the server.
func (*TLSConfig) AddCaCertFromFile ¶
AddCaCertFromFile adds a root CA certificate to the configuration given a path to the containing file.
func (*TLSConfig) AddClientCertFromFile ¶
AddClientCertFromFile adds a client certificate to the configuration given a path to the containing file and returns the certificate's subject name.
func (*TLSConfig) MakeConfig ¶
MakeConfig constructs a new tls.Config from the configuration specified.
func (*TLSConfig) SetInsecure ¶
SetInsecure sets whether the client should verify the server's certificate chain and hostnames.
type TLSDBConnector ¶
type TLSDBConnector struct {
// contains filtered or unexported fields
}
TLSDBConnector makes a connection to the database with Go native TLS.
func (*TLSDBConnector) Configure ¶
func (c *TLSDBConnector) Configure(opts options.ToolOptions) error
Configure the connector to connect to the server over ssl. Sets up the correct function to dial the server based on the ssl options passed in.
func (*TLSDBConnector) GetNewSession ¶
func (c *TLSDBConnector) GetNewSession() (*mgo.Session, error)
GetNewSession dials the server.