Documentation ¶
Index ¶
- type BSOND
- type Client
- func (clnt *Client) DeleteMany(coll string, filter bson.D) int64
- func (clnt *Client) Find(coll string, query interface{}) []*mongo.Cursor
- func (clnt *Client) FindOne(coll string, query interface{}) *mongo.SingleResult
- func (clnt *Client) FindOneAndUpdate(coll string, query bson.D, doc *primitive.D) *mongo.SingleResult
- func (clnt *Client) Save(coll string, model interface{}) *mongo.InsertOneResult
- func (clnt *Client) ToBsonDoc(v interface{}) (doc *bson.D, err error)
- type ClientOptions
- type ObjectID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client - client object
func Create ¶
func Create(co ClientOptions) (Client, error)
Create - Create mongo client using the client options
func (*Client) DeleteMany ¶
DeleteMany - Delete one or many objects
func (*Client) FindOne ¶
func (clnt *Client) FindOne(coll string, query interface{}) *mongo.SingleResult
FindOne - Find one document
func (*Client) FindOneAndUpdate ¶
func (clnt *Client) FindOneAndUpdate(coll string, query bson.D, doc *primitive.D) *mongo.SingleResult
FindOneAndUpdate - Update one document
type ClientOptions ¶
ClientOptions - connection settings and options for mongoDB
Click to show internal directories.
Click to hide internal directories.