Documentation
¶
Index ¶
- type RepositoryMock
- func (m *RepositoryMock) Aggregate(ctx context.Context, collection mongoModel.Collection, pipe mongo.Pipeline) (*mongo.Cursor, error)
- func (m *RepositoryMock) CollectionIndexes(ctx context.Context, collection mongoModel.Collection) (map[string]*mongoModel.DBIndex, error)
- func (m *RepositoryMock) Count(ctx context.Context, collection mongoModel.Collection, find interface{}, ...) (int64, error)
- func (m *RepositoryMock) CreateIndex(ctx context.Context, index *mongoModel.DBIndex) (string, error)
- func (m *RepositoryMock) CreateTextIndex(ctx context.Context, index *mongoModel.DBTextIndex) (string, error)
- func (m *RepositoryMock) DeleteMany(ctx context.Context, collection mongoModel.Collection, filter interface{}, ...) (*mongo.DeleteResult, error)
- func (m *RepositoryMock) DeleteOne(ctx context.Context, collection mongoModel.Collection, filter interface{}, ...) (*mongo.DeleteResult, error)
- func (m *RepositoryMock) Find(ctx context.Context, collection mongoModel.Collection, ...) error
- func (m *RepositoryMock) FindOne(ctx context.Context, collection mongoModel.Collection, ...) error
- func (m *RepositoryMock) FindOneAndUpdate(ctx context.Context, collection mongoModel.Collection, ...) error
- func (m *RepositoryMock) Insert(ctx context.Context, collection mongoModel.Collection, data interface{}) (string, error)
- func (m *RepositoryMock) InsertMany(ctx context.Context, collection mongoModel.Collection, data []interface{}) ([]string, error)
- func (m *RepositoryMock) ReplaceOne(ctx context.Context, collection mongoModel.Collection, ...) error
- func (m *RepositoryMock) TryCreateIndex(ctx context.Context, index *mongoModel.DBIndex) error
- func (m *RepositoryMock) UpdateMany(ctx context.Context, collection mongoModel.Collection, filter interface{}, ...) (int64, error)
- func (m *RepositoryMock) UpdateOne(ctx context.Context, collection mongoModel.Collection, ...) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RepositoryMock ¶
func GetRepository ¶
func GetRepository() *RepositoryMock
func (*RepositoryMock) Aggregate ¶
func (m *RepositoryMock) Aggregate(ctx context.Context, collection mongoModel.Collection, pipe mongo.Pipeline) (*mongo.Cursor, error)
func (*RepositoryMock) CollectionIndexes ¶
func (m *RepositoryMock) CollectionIndexes(ctx context.Context, collection mongoModel.Collection) (map[string]*mongoModel.DBIndex, error)
func (*RepositoryMock) Count ¶
func (m *RepositoryMock) Count(ctx context.Context, collection mongoModel.Collection, find interface{}, opt *options.CountOptions) (int64, error)
func (*RepositoryMock) CreateIndex ¶
func (m *RepositoryMock) CreateIndex(ctx context.Context, index *mongoModel.DBIndex) (string, error)
func (*RepositoryMock) CreateTextIndex ¶
func (m *RepositoryMock) CreateTextIndex(ctx context.Context, index *mongoModel.DBTextIndex) (string, error)
func (*RepositoryMock) DeleteMany ¶
func (m *RepositoryMock) DeleteMany(ctx context.Context, collection mongoModel.Collection, filter interface{}, opt *options.DeleteOptions) (*mongo.DeleteResult, error)
func (*RepositoryMock) DeleteOne ¶
func (m *RepositoryMock) DeleteOne(ctx context.Context, collection mongoModel.Collection, filter interface{}, opt *options.DeleteOptions) (*mongo.DeleteResult, error)
func (*RepositoryMock) Find ¶
func (m *RepositoryMock) Find(ctx context.Context, collection mongoModel.Collection, results, find interface{}, opt *options.FindOptions) error
func (*RepositoryMock) FindOne ¶
func (m *RepositoryMock) FindOne(ctx context.Context, collection mongoModel.Collection, resultModel, findQuery interface{}, findOptions *options.FindOneOptions) error
func (*RepositoryMock) FindOneAndUpdate ¶
func (m *RepositoryMock) FindOneAndUpdate(ctx context.Context, collection mongoModel.Collection, resultModel, filter, updateData interface{}, opt *options.FindOneAndUpdateOptions) error
func (*RepositoryMock) Insert ¶
func (m *RepositoryMock) Insert(ctx context.Context, collection mongoModel.Collection, data interface{}) (string, error)
func (*RepositoryMock) InsertMany ¶
func (m *RepositoryMock) InsertMany(ctx context.Context, collection mongoModel.Collection, data []interface{}) ([]string, error)
func (*RepositoryMock) ReplaceOne ¶
func (m *RepositoryMock) ReplaceOne(ctx context.Context, collection mongoModel.Collection, filter, data interface{}) error
func (*RepositoryMock) TryCreateIndex ¶
func (m *RepositoryMock) TryCreateIndex(ctx context.Context, index *mongoModel.DBIndex) error
func (*RepositoryMock) UpdateMany ¶
func (m *RepositoryMock) UpdateMany( ctx context.Context, collection mongoModel.Collection, filter interface{}, data interface{}, opts ...*options.UpdateOptions, ) (int64, error)
func (*RepositoryMock) UpdateOne ¶
func (m *RepositoryMock) UpdateOne(ctx context.Context, collection mongoModel.Collection, filter, data interface{}, opts ...*options.UpdateOptions) (int64, error)
Click to show internal directories.
Click to hide internal directories.