Documentation ¶
Index ¶
- type Client
- func (c *Client) Aggregate(database string, collection string, pipeline interface{}) ([]bson.M, error)
- func (c *Client) CountDocuments(database string, collection string, filter interface{}) (int64, error)
- func (c *Client) DeleteMany(database string, collection string, filter map[string]string) error
- func (c *Client) DeleteOne(database string, collection string, filter map[string]string) error
- func (c *Client) Disconnect() error
- func (c *Client) Distinct(database string, collection string, field string, filter interface{}) ([]interface{}, error)
- func (c *Client) DropCollection(database string, collection string) error
- func (c *Client) Find(database string, collection string, filter interface{}, sort interface{}, ...) ([]bson.M, error)
- func (c *Client) FindAll(database string, collection string) ([]bson.M, error)
- func (c *Client) FindOne(database string, collection string, filter map[string]string) (bson.M, error)
- func (c *Client) FindOneAndUpdate(database string, collection string, filter interface{}, update interface{}) (*mongo.SingleResult, error)
- func (c *Client) Insert(database string, collection string, doc interface{}) error
- func (c *Client) InsertMany(database string, collection string, docs []interface{}) error
- func (c *Client) UpdateMany(database string, collection string, filter interface{}, data bson.D) error
- func (c *Client) UpdateOne(database string, collection string, filter interface{}, data bson.D) error
- func (c *Client) Upsert(database string, collection string, filter interface{}, upsert interface{}) error
- type Mongo
- type UpsertOneModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the Mongo client wrapper.
func (*Client) CountDocuments ¶
func (*Client) DeleteMany ¶
func (*Client) Disconnect ¶
func (*Client) DropCollection ¶
func (*Client) FindOneAndUpdate ¶
func (*Client) InsertMany ¶
func (*Client) UpdateMany ¶
type UpsertOneModel ¶
type UpsertOneModel struct { Query interface{} `json:"query"` Update interface{} `json:"update"` }
Click to show internal directories.
Click to hide internal directories.