Documentation
¶
Index ¶
- type Client
- func (c *Client) AssertIndex(collection string, field string) (string, error)
- func (c *Client) AssertTtlIndex(collection string, field string, expireSeconds int32) (string, error)
- func (c *Client) AssertUniqueIndex(collection string, field string) (string, error)
- func (c *Client) Close()
- func (c *Client) Coll(collection string) *mongo.Collection
- func (c *Client) DeleteMany(collection string, filter interface{}) (*mongo.DeleteResult, error)
- func (c *Client) DeleteOne(collection string, filter interface{}) (*mongo.DeleteResult, error)
- func (c *Client) DeleteOneByField(collection string, field string, value interface{}) (*mongo.DeleteResult, error)
- func (c *Client) DeleteOneById(collection string, id interface{}) (*mongo.DeleteResult, error)
- func (c *Client) FindMany(collection string, filter interface{}, sort interface{}, limit int64, ...) error
- func (c *Client) FindManyByField(collection string, field string, value interface{}, limit int64, v interface{}) error
- func (c *Client) FindOne(collection string, filter interface{}, v interface{}) (bool, error)
- func (c *Client) FindOneByField(collection string, field string, value interface{}, v interface{}) (bool, error)
- func (c *Client) FindOneById(collection string, id interface{}, v interface{}) (bool, error)
- func (c *Client) InsertMany(collection string, v []interface{}) (*mongo.InsertManyResult, error)
- func (c *Client) InsertOne(collection string, v interface{}) (*mongo.InsertOneResult, error)
- func (c *Client) Ping() error
- func (c *Client) UpdateOne(collection string, filter interface{}, update interface{}) (*mongo.UpdateResult, error)
- func (c *Client) UpdateOneByField(collection string, field string, value interface{}, update interface{}) (*mongo.UpdateResult, error)
- func (c *Client) UpdateOneById(collection string, id interface{}, update interface{}) (*mongo.UpdateResult, error)
- func (c *Client) UpsertOne(collection string, filter interface{}, update interface{}) (*mongo.UpdateResult, error)
- func (c *Client) UpsertOneByField(collection string, field string, value interface{}, update interface{}) (*mongo.UpdateResult, error)
- func (c *Client) UpsertOneById(collection string, id interface{}, update interface{}) (*mongo.UpdateResult, error)
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
}
func (*Client) AssertIndex ¶
func (*Client) AssertTtlIndex ¶
func (*Client) AssertUniqueIndex ¶
func (*Client) DeleteMany ¶
func (c *Client) DeleteMany(collection string, filter interface{}) (*mongo.DeleteResult, error)
func (*Client) DeleteOne ¶
func (c *Client) DeleteOne(collection string, filter interface{}) (*mongo.DeleteResult, error)
func (*Client) DeleteOneByField ¶
func (*Client) DeleteOneById ¶
func (c *Client) DeleteOneById(collection string, id interface{}) (*mongo.DeleteResult, error)
func (*Client) FindManyByField ¶
func (*Client) FindOneByField ¶
func (*Client) FindOneById ¶
func (*Client) InsertMany ¶
func (c *Client) InsertMany(collection string, v []interface{}) (*mongo.InsertManyResult, error)
func (*Client) InsertOne ¶
func (c *Client) InsertOne(collection string, v interface{}) (*mongo.InsertOneResult, error)
func (*Client) UpdateOne ¶
func (c *Client) UpdateOne(collection string, filter interface{}, update interface{}) (*mongo.UpdateResult, error)
func (*Client) UpdateOneByField ¶
func (*Client) UpdateOneById ¶
func (c *Client) UpdateOneById(collection string, id interface{}, update interface{}) (*mongo.UpdateResult, error)
func (*Client) UpsertOne ¶
func (c *Client) UpsertOne(collection string, filter interface{}, update interface{}) (*mongo.UpdateResult, error)
func (*Client) UpsertOneByField ¶
func (*Client) UpsertOneById ¶
func (c *Client) UpsertOneById(collection string, id interface{}, update interface{}) (*mongo.UpdateResult, error)
Click to show internal directories.
Click to hide internal directories.