MongoClientSettings

Members

Functions

authenticatePassword
void authenticatePassword(string username, string password)

Sets the username and the digest string in this MongoClientSettings instance.

authenticateSSL
void authenticateSSL(string username, string sslPEMKeyFile, string sslCAFile)

Sets ssl, the username, the PEM key file and the trusted CA file in this MongoClientSettings instance.

Static functions

makeDigest
string makeDigest(string username, string password)

Generates a digest string which can be used for authentication by setting the username and digest members.

Variables

appName
string appName;

Application name for the connection information when connected.

authMechanism
MongoAuthMechanism authMechanism;

Use the given authentication mechanism when connecting to the server. If unsupported by the server, throw a MongoAuthException.

connectTimeoutMS
long connectTimeoutMS;

The time in milliseconds to attempt a connection before timing out.

database
string database;

Default auth database to operate on, otherwise operating on special "admin" database for all MongoDB authentication commands.

defQueryFlags
QueryFlags defQueryFlags;

Flags to use on all database query commands. The vibe.db.mongo.flags.QueryFlags.slaveOk bit may be set using the "slaveok" query parameter inside the MongoDB URL.

defaultPort
enum ushort defaultPort;

Gets the default port used for MongoDB connections

digest
string digest;

The password hashed as MongoDB digest as returned by makeDigest.

fsync
bool fsync;
Undocumented in source.
hosts
MongoHost[] hosts;

MongoDB hosts to try to connect to.

journal
bool journal;

Requests acknowledgment that write operations have been written to the on-disk journal.

maxConnections
uint maxConnections;

Amount of maximum simultaneous connections to have open at the same time.

replicaSet
string replicaSet;

Specifies the name of the replica set, if the mongod is a member of a replica set.

safe
bool safe;

Automatically check for errors when operating on collections and throw a vibe.db.mongo.connection.MongoDBException in case of errors.

socketTimeoutMS
long socketTimeoutMS;

The time in milliseconds to attempt a send or receive on a socket before the attempt times out.

ssl
bool ssl;

Enables or disables TLS/SSL for the connection.

sslCAFile
string sslCAFile;

Path to a certificate authority file for verifying the remote certificate.

sslPEMKeyFile
string sslPEMKeyFile;

Path to a certificate with private key and certificate chain to connect with.

sslverifycertificate
bool sslverifycertificate;

Can be set to false to disable TLS peer validation to allow self signed certificates.

username
string username;

If set to non-empty string, use this username to try to authenticate with to the database. Only has an effect if digest or sslPEMKeyFile is set too

w
Bson w;

Requests acknowledgment that write operations have propagated to a specified number of mongod instances (number) or to mongod instances with specified tags (string) or "majority" for calculated majority.

wTimeoutMS
long wTimeoutMS;

Time limit for the w option to prevent write operations from blocking indefinitely.

See Also

Meta