Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeStream ¶
type Client ¶
type Collection ¶
type Collection interface {
Watch(ctx context.Context, pipeline interface{}, opts ...*options.ChangeStreamOptions) (ChangeStream, error)
FindOne(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) SingleResult
Find(ctx context.Context, filter interface{}, opts ...*options.FindOptions) (Cursor, error)
InsertOne(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (InsertResult, error)
UpdateOne(
ctx context.Context,
filter interface{},
update interface{},
opts ...*options.UpdateOptions,
) (UpdateResult, error)
UpdateMany(
ctx context.Context,
filter interface{},
update interface{},
opts ...*options.UpdateOptions,
) (UpdateResult, error)
FindOneAndUpdate(
ctx context.Context,
filter interface{},
update interface{},
opts ...*options.FindOneAndUpdateOptions,
) SingleResult
DeleteOne(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (DeleteResult, error)
DeleteMany(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (DeleteResult, error)
CountDocuments(ctx context.Context, filter interface{}, opts ...*options.CountOptions) (int64, error)
Indexes() IndexView
}
type Database ¶
type Database interface {
Collection(name string) Collection
CollectionWithReadPref(name string, rp *readpref.ReadPref) Collection
RunCommand(ctx context.Context, runCommand interface{}) SingleResult
}
type DeleteResult ¶
type DeleteResult interface {
DeletedCount() int64
}
type IndexView ¶
type IndexView interface {
CreateMany(ctx context.Context, models []mongo.IndexModel, opts ...*options.CreateIndexesOptions) ([]string, error)
}
type InsertResult ¶
type InsertResult interface {
InsertedID() interface{}
}
type MongoClient ¶
type MongoClient struct {
// contains filtered or unexported fields
}
func (*MongoClient) Database ¶
func (m *MongoClient) Database(name string) Database
func (*MongoClient) GetClient ¶
func (m *MongoClient) GetClient() *mongo.Client
type SingleResult ¶
type UpdateResult ¶
Click to show internal directories.
Click to hide internal directories.