Documentation
¶
Index ¶
- type MongoFactory
- func (f *MongoFactory) Find(collectionName string, filter bson.D) []*bson.M
- func (f *MongoFactory) GetClient() *mongo.Client
- func (f *MongoFactory) GetContext() *executioncontext.Context
- func (f *MongoFactory) GetDatabase() *mongo.Database
- func (f *MongoFactory) InsertMany(collectionName string, elements []interface{}) *mongo.InsertManyResult
- func (f *MongoFactory) InsertOne(collectionName string, element interface{}) *mongo.InsertOneResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoFactory ¶
type MongoFactory struct { Client *mongo.Client Database *mongo.Database Context *executioncontext.Context }
MongoFactory MongoFactory Entity
func (*MongoFactory) GetClient ¶
func (f *MongoFactory) GetClient() *mongo.Client
GetClient returns mongodb client
func (*MongoFactory) GetContext ¶
func (f *MongoFactory) GetContext() *executioncontext.Context
GetContext Gets the Execution context
func (*MongoFactory) GetDatabase ¶
func (f *MongoFactory) GetDatabase() *mongo.Database
GetDatabase returns MongoDb database
func (*MongoFactory) InsertMany ¶
func (f *MongoFactory) InsertMany(collectionName string, elements []interface{}) *mongo.InsertManyResult
InsertMany Inserts one document into the selected collection
func (*MongoFactory) InsertOne ¶
func (f *MongoFactory) InsertOne(collectionName string, element interface{}) *mongo.InsertOneResult
InsertOne Inserts one document into the selected collection
Click to show internal directories.
Click to hide internal directories.