Documentation ¶
Index ¶
- Variables
- func Add(document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
- func Disconnect()
- func Exist(filter interface{}, opts ...*options.CountOptions) (bool, error)
- func Get(filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult
- func Remove(filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
- func Start() error
- func Update(filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMongoUsername = errors.New("missing MONGO_USERNAME environmental variable for MongoDB") ErrMongoPassword = errors.New("missing MONGO_PASSWORD environmental variable for MongoDB") ErrMongoAddr = errors.New("missing MONGO_ADDR environmental variable for MongoDB") ErrMongoPort = errors.New("missing MONGO_PORT environmental variable for MongoDB") )
Functions ¶
func Add ¶
func Add(document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
Command wrappers for other packages
func Disconnect ¶
func Disconnect()
func Get ¶
func Get(filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult
func Remove ¶
func Remove(filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
func Update ¶
func Update(filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.