License
Subject to the terms of the MIT license, as written in the included LICENSE.txt file.
MongoDB client connection settings.
Describes a vibe.d supported authentication mechanism to use on client connection to a MongoDB server.
ushort defaultPortGets the default port used for MongoDB connectionsstring usernameIf 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 toostring digestThe password hashed as MongoDB digest as returned by makeDigest.uint maxConnectionsAmount of maximum simultaneous connections to have open at the same time.MongoHost[] hostsMongoDB hosts to try to connect to.string databaseDefault auth database to operate on, otherwise operating on special "admin" database for all MongoDB authentication commands.QueryFlags defQueryFlagsstring replicaSetSpecifies the name of the replica set, if the mongod is a member of a replica set.bool safeAutomatically check for errors when operating on collections and throw a MongoDBException in case of errors.Bson wRequests 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 maj...long wTimeoutMSTime limit for the w option to prevent write operations from blocking indefinitely.bool fsyncbool journalRequests acknowledgment that write operations have been written to the [on-disk journal](https://docs.mongodb.com/manual/core/journaling/).Duration connectTimeoutThe time to attempt a connection before timing out.Duration socketTimeoutThe time to attempt a send or receive on a socket before the attempt times out.bool sslEnables or disables TLS/SSL for the connection.bool sslverifycertificateCan be set to false to disable TLS peer validation to allow self signed certificates.string sslPEMKeyFilePath to a certificate with private key and certificate chain to connect with.string sslCAFilePath to a certificate authority file for verifying the remote certificate.string authSourceSpecify the database name associated with the user's credentials. If `authSource` is unspecified, `authSource` defaults to the `defaultauthdb` specified in the connection string. If `defaultauthdb`...MongoAuthMechanism authMechanismUse the given authentication mechanism when connecting to the server. If unsupported by the server, throw a MongoAuthException.string[] authMechanismPropertiesSpecify properties for the specified authMechanism as a comma-separated list of colon-separated key-value pairs.string appNameApplication name for the connection information when connected.string makeDigest(string username, string password) pure @safeGenerates a digest string which can be used for authentication by setting the username and digest members.void authenticatePassword(string username, string password) @safeSets the username and the digest string in this MongoClientSettings instance.void authenticateSSL(string username, string sslPEMKeyFile, string sslCAFile = null) @safeSets ssl, the username, the PEM key file and the trusted CA file in this MongoClientSettings instance.string getAuthDatabase() @safe @nogc nothrow pure const returnResolves the database to run authentication commands on. (authSource if set, otherwise the URI's database if set, otherwise "admin")Describes a host we might be able to connect to
string nameThe host name or IP address of the remote MongoDB server.ushort portThe port of the MongoDB server. See `MongoClientSettings.defaultPort`.bool parseMongoDBUrl(out MongoClientSettings cfg, string url) @safeParses the given string as a mongodb URL. The URL must be in the form documented at http://www.mongodb.org/display/DOCS/Connections which is: