# Functions
BuildURI assembles a URI from host and port arguments, including a possible replica set name on the host part.
Split the host string into the individual nodes to connect to, appending the port if necessary.
EnableTCPKeepAlive enables TCP keepalive on the underlying TCP connection.
No description provided by the author
No description provided by the author
GetFieldsFromFile fetches the first line from the contents of the file at "path".
IsFalsy returns true for values the server will interpret as "false".
IsTruthy returns true for values the server will interpret as "true".
Return the max of two ints.
Pluralize takes an amount and two strings denoting the singular and plural noun the amount represents.
No description provided by the author
No description provided by the author
generic function that returns true if elt is in slice.
generic function that returns number of instances of 'elt' in 'slice'.
SplitAndValidateNamespace splits a namespace path into a database and collection, returned in that order.
Extract the replica set name and the list of hosts from the connection string.
SplitNamespace splits a namespace path into a database and collection, returned in that order.
StringSliceContains reports whether str is in the slice.
StringSliceContains returns the first index at which the given element can be found in the slice, or -1 if it is not present.
TimestampGreaterThan returns true if lhs comes after rhs, false otherwise.
TimestampLessThan returns true if lhs comes before rhs, false otherwise.
ToFloat64 is a function for converting any numeric type into a float64.
ToInt is a function for converting any numeric type into an int.
ToUInt32 is a function for converting any numeric type into a uint32.
ToUniversalPath returns the result of replacing each slash ('/') character in "path" with an OS-sepcific separator character.
No description provided by the author
ValidateCollectionGrammar validates the collection for character and length errors without erroring on system collections.
ValidateCollectionName validates that a string is a valid name for a mongodb collection.
ValidateDBName validates that a string is a valid name for a mongodb database.
ValidateFullNamespace validates a full mongodb namespace (database + collection), returning an error if it is invalid.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
# Structs
Wrapper around Cursor to implement Closer.
Wrapper that can capture errors that occur when closing the underlying closer.
SetupError is the error thrown by "New" functions used to convey what error occurred and the appropriate exit code.
No description provided by the author
No description provided by the author