Documentation ¶
Index ¶
- type CollectionAPI
- type MockCollection
- func (m *MockCollection) Find(ctx context.Context, filter interface{}, opts ...*options.FindOptions) (cur *mongo.Cursor, err error)
- func (m *MockCollection) FindOne(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult
- func (m *MockCollection) InsertOne(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
- func (m *MockCollection) UpdateByID(ctx context.Context, id interface{}, update interface{}, ...) (*mongo.UpdateResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectionAPI ¶
type CollectionAPI interface { InsertOne( ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error) UpdateByID( ctx context.Context, id interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error) FindOne( ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult Find( ctx context.Context, filter interface{}, opts ...*options.FindOptions) (cur *mongo.Cursor, err error) }
type MockCollection ¶
func (*MockCollection) Find ¶
func (m *MockCollection) Find( ctx context.Context, filter interface{}, opts ...*options.FindOptions) (cur *mongo.Cursor, err error)
func (*MockCollection) FindOne ¶
func (m *MockCollection) FindOne( ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult
func (*MockCollection) InsertOne ¶
func (m *MockCollection) InsertOne( ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
func (*MockCollection) UpdateByID ¶
func (m *MockCollection) UpdateByID( ctx context.Context, id interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
Click to show internal directories.
Click to hide internal directories.