Documentation ¶
Index ¶
- func AddIndex(collection *mgm.Collection, config IndexKey) (string, error)
- func AddIndexes(collection *mgm.Collection, fields []IndexKey) ([]string, error)
- func Collection(collection mgm.Model) *mgm.Collection
- func Delete(collection *mgm.Collection, object mgm.Model) error
- func Find(collection *mgm.Collection, result interface{}, filter bson.M, ...) error
- func FindByID(id string, collection *mgm.Collection, obj mgm.Model) error
- func First(collection *mgm.Collection, object mgm.Model, filter bson.M) error
- func InitialiseDatabase(dbName string, mongoURI string)
- func InsertOne(collection *mgm.Collection, object mgm.Model) error
- func Replace(collection *mgm.Collection, object mgm.Model) error
- type IndexKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddIndexes ¶
func Collection ¶
func Collection(collection mgm.Model) *mgm.Collection
func Find ¶
func Find(collection *mgm.Collection, result interface{}, filter bson.M, findOptions *options.FindOptions) error
func InitialiseDatabase ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.