You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provides helpers on top of [mgo](https://github.com/globalsign/mgo) and the official [mongo-go-driver](https://github.com/mongodb/mongo-go-driver)
3
+
Provides helpers on top of [mongo-go-driver](https://github.com/mongodb/mongo-go-driver)
4
4
5
5
## Version 2, with the official mongo-go-driver
6
6
@@ -26,49 +26,3 @@ Provides helpers on top of [mgo](https://github.com/globalsign/mgo) and the offi
26
26
`mongo.MakeTestConnection` creates `mongo.Client` and `mongo.Collection` for url defined in env `MONGO_TEST`.
27
27
If not defined`mongodb://mongo:27017` used. By default it will use random connection with prefix `test_` in `test` DB.
28
28
29
-
30
-
## Legacy version, with mgo
31
-
32
-
- Install and update - `go get -u github.com/go-pkgz/mongo`
33
-
34
-
-`Server` represents mongo instance and provides session accessor. Application usually creates one server object and uses it for anything needed with this particular mongo host or replica set.
35
-
36
-
-`Connection` encapsulates session and provides auto-closable wrapper. Each requests runs inside one of With* function makes new mongo session and closes on completion.
37
-
38
-
-`BufferedWriter` implements buffered writer to mongo. Write method caching internally till it reached buffer size. Flush methods can be called manually at any time.
39
-
40
-
41
-
```golang
42
-
m, err:=NewServerWithURL("mongodb://127.0.0.1:27017/test?debug=true", 3*time.Second)
`testing.go` helps to create test for real mongo (not mocks)
71
-
72
-
-`mongo.MakeTestConnection` creates `mongo.Connection` for url defined in env `MONGO_TEST`. If not defined `mongodb://mongo:27017` used. By default it will use random connection with prefix `test_` in `test` DB.
73
-
-`mongo.RemoveTestCollection` - drops collection used by `MakeTestConnection`
74
-
-`mongo.RemoveTestCollections` - drops user-defined collections from `test` DB
0 commit comments