diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2016-07-29 00:59:48 +0100 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2016-07-31 22:09:59 +0100 |
commit | 04aeda21e0ad2f7e8dd2bad3328e6ce0ba38f6a9 (patch) | |
tree | 3da48edf177826aeaae69447fd1fb001e873c43a /vendor/gopkg.in/mgo.v2/doc.go | |
parent | 531f63e5a9e82d86a6ee1f5d44bebee0bc51d828 (diff) |
Support mongo datastores
Diffstat (limited to 'vendor/gopkg.in/mgo.v2/doc.go')
-rw-r--r-- | vendor/gopkg.in/mgo.v2/doc.go | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/vendor/gopkg.in/mgo.v2/doc.go b/vendor/gopkg.in/mgo.v2/doc.go new file mode 100644 index 0000000..859fd9b --- /dev/null +++ b/vendor/gopkg.in/mgo.v2/doc.go @@ -0,0 +1,31 @@ +// Package mgo offers a rich MongoDB driver for Go. +// +// Details about the mgo project (pronounced as "mango") are found +// in its web page: +// +// http://labix.org/mgo +// +// Usage of the driver revolves around the concept of sessions. To +// get started, obtain a session using the Dial function: +// +// session, err := mgo.Dial(url) +// +// This will establish one or more connections with the cluster of +// servers defined by the url parameter. From then on, the cluster +// may be queried with multiple consistency rules (see SetMode) and +// documents retrieved with statements such as: +// +// c := session.DB(database).C(collection) +// err := c.Find(query).One(&result) +// +// New sessions are typically created by calling session.Copy on the +// initial session obtained at dial time. These new sessions will share +// the same cluster information and connection pool, and may be easily +// handed into other methods and functions for organizing logic. +// Every session created must have its Close method called at the end +// of its life time, so its resources may be put back in the pool or +// collected, depending on the case. +// +// For more details, see the documentation for the types and methods. +// +package mgo |