Documentation ¶ Index ¶ type MongoDb func NewMongoDb(db *mgo.Database) (mdb *MongoDb) func (m *MongoDb) Create(col string, docs ...interface{}) (err error) func (m *MongoDb) Remove(col string, idField string, ids ...interface{}) (err error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type MongoDb ¶ type MongoDb struct { // contains filtered or unexported fields } func NewMongoDb ¶ func NewMongoDb(db *mgo.Database) (mdb *MongoDb) func (*MongoDb) Create ¶ func (m *MongoDb) Create(col string, docs ...interface{}) (err error) func (*MongoDb) Remove ¶ func (m *MongoDb) Remove(col string, idField string, ids ...interface{}) (err error) Note: If the id field is "Id", MongoDb will convert it into "_id", which is the real id of documents in mongodb. If this conversion doesn't fit in your cases, feel free to create you own mongo db driver. Source Files ¶ View all Source files db.go Click to show internal directories. Click to hide internal directories.