Skip to content

Mongo-Go-Driver wrapper allowing convenient interaction with MongoDB.

License

Notifications You must be signed in to change notification settings

TerrexTech/go-mongoutils

Repository files navigation

Go Mongo-Utils


This package helps in bootstrapping Mongo, including tasks such as creating database-clients, databases, and collections.

Go Docs.
Check example usage here: examples/example.go
More examples can be found in test-files.

Developer Notes


Since the base driver, mongo-go-driver, is in Alpha state, we run extensive integration tests within required domain to ensure this library functions well. Hence, a working MongoDB instance is required to run tests.

The tests will run using database lib_test_db, which will be deleted after each test to ensure test-independence. So do not use this database for anything.

By default, the test-suite will try to read connection string from environment-variable MONGODB_TEST_CONN_STR, however, if the variable is not present, the default string mongodb://root:root@localhost:27017 will be used for connection.