Documentation
¶
Index ¶
- func Connect(envName string) (*mongo.Client, error)
- func DeleteOne(collection *mongo.Collection, filter interface{}) (*mongo.DeleteResult, error)
- func Disconnect(client *mongo.Client)
- func FindMany(collection *mongo.Collection, filter interface{}) (*mongo.Cursor, error)
- func FindOne(collection *mongo.Collection, filter interface{}) *mongo.SingleResult
- func GetCollection(client *mongo.Client, dbName string, collectionName string) *mongo.Collection
- func InsertMany(collection *mongo.Collection, data []interface{}) (*mongo.InsertManyResult, error)
- func InsertOne(collection *mongo.Collection, data interface{}) (*mongo.InsertOneResult, error)
- func LoadEnv(envName string) string
- func UpdateMany(collection mongo.Collection, filter interface{}, update interface{}) (*mongo.UpdateResult, error)
- func UpdateOne(collection mongo.Collection, filter interface{}, update interface{}) (*mongo.UpdateResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteOne ¶ added in v0.0.6
func DeleteOne(collection *mongo.Collection, filter interface{}) (*mongo.DeleteResult, error)
func Disconnect ¶ added in v0.0.4
func FindMany ¶ added in v0.0.7
func FindMany(collection *mongo.Collection, filter interface{}) (*mongo.Cursor, error)
func FindOne ¶ added in v0.0.4
func FindOne(collection *mongo.Collection, filter interface{}) *mongo.SingleResult
func GetCollection ¶ added in v0.0.3
func InsertMany ¶ added in v0.0.4
func InsertMany(collection *mongo.Collection, data []interface{}) (*mongo.InsertManyResult, error)
func InsertOne ¶ added in v0.0.4
func InsertOne(collection *mongo.Collection, data interface{}) (*mongo.InsertOneResult, error)
func UpdateMany ¶ added in v0.0.7
func UpdateMany(collection mongo.Collection, filter interface{}, update interface{}) (*mongo.UpdateResult, error)
func UpdateOne ¶ added in v0.0.6
func UpdateOne(collection mongo.Collection, filter interface{}, update interface{}) (*mongo.UpdateResult, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.