# Functions
AddTlsHandler adds the TLS handling logic to a provided `*mgo.DialInfo`
{dialInfo} - The DialInfo to use {cert} - The PEM bytes of the CA cert to use for TLS {insecureSkipVerify} - Controls whether a client verifies the server's certificate chain and host name.
Dial establishes a new session to the cluster identified by the given seed server(s).
DialWithInfo establishes a new session to the cluster identified by info.
DialWithTimeout works like Dial, but uses timeout as the amount of time to wait for a server to respond when first connecting and also on follow up operations in the session.
DialWithTls attempts to establish a MongoDB connection using TLS with the provided PEM encoded certificate.
IsDup returns whether err informs of a duplicate key error because a primary key index or a secondary unique index already has an entry with the given value.
MockCollection returns a new instance of ICollection for mocking purposes
{t}: The instance of *testing.T used in the test {col}: An optional instance of ICollection to handle real calls if wanted.
MockDb returns a new instance of IDatabase for mocking purposes
{db}: An optional instance of IDatabase to handle real calls if wanted.
MockQuery returns a new instance of IQuery for mocking purposes
{q}: An optional instance of IQuery to handle real calls if wanted.
MockSession returns a new instance of IQuery for mocking purposes
{q}: An optional instance of IQuery to handle real calls if wanted.
NewBulk creates an instance of IBulk with the given ICollection if passed as an arg.
NewCollection creates an instance of ICollection with the given *mgo.Collection if passed as an arg.
NewDatabase creates an instance of IDatabase with the given *mgo.Database if passed as an arg.
NewPipe creates an instance of IPipe with the given *mgo.Pipe if passed as an arg.
NewQuery creates an instance of IQuery with the given *mgo.Query if passed as an arg.
NewSession creates an instance of ISession with the given *mgo.Session if passed as an arg.
ParseURL parses a MongoDB URL as accepted by the Dial function and returns a value suitable for providing into DialWithInfo.
No description provided by the author
# Variables
DialMaxRetries defines the maximum amount of retries to attempt when dialing to a connection to a mongodb instance.
DialRetrySleep defines the sleep time between retries when dialing for a connection to a mongodb instance.
DialTimeout indicates the max time to wait before aborting a dialing attempt.
ErrCursor is the error returned when the cursor used in a mongo operation is not valid.
ErrNotFound is the error returned when no results are found in a mongo operation.
# Structs
BulkResult See the BulkResult documentation in `gopkg.in/mgo.v2` for more information.
Change See the Change documentation in `gopkg.in/mgo.v2` for more information.
ChangeInfo See the ChangeInfo documentation in `gopkg.in/mgo.v2` for more information.
CollectionInfo See the CollectionInfo documentation in `gopkg.in/mgo.v2` for more information.
CollectionMock: Is the mock struct use for ICollection mocking.
DatabaseMock is a mock of IDatabase.
No description provided by the author
Index See the Index documentation in `gopkg.in/mgo.v2` for more information.
MapReduce See the MapReduce documentation in `gopkg.in/mgo.v2` for more information.
MapReduceInfo See the MapReduceInfo documentation in `gopkg.in/mgo.v2` for more information.
MapReduceTime See the MapReduceTime documentation in `gopkg.in/mgo.v2` for more information.
No description provided by the author
QueryMock is a mock implementation of IQuery.
QueryMock is a mock implementation of IQuery.
# Interfaces
IBulk is an interface which matches the contract for the `Bulk` struct in `gopkg.in/mgo.v2` package.
ICollection is an interface which matches the contract for the `collection` struct in `gopkg.in/mgo.v2` package.
ICollectionExtensions encapsulates the new extended functions to the original ICollection.
IDatabase is an interface which matches the contract for the `Database` struct in `gopkg.in/mgo.v2` package.
IDatabaseExtensions encapsulates the new extended functions to the original IDatabase.
No description provided by the author
IPipe is an interface which matches the contract for the `Pipe` struct in `gopkg.in/mgo.v2` package.
IQuery is an interface which matches the contract for the `query` struct in `gopkg.in/mgo.v2` package.
IQueryPageExtension encapsulates the new extended functions to the original IQuery.
ISession is an interface which matches the contract for the `Session` struct in `gopkg.in/mgo.v2` package.
ISessionExtensions encapsulates the new extended functions to the original ISession.