Documentation ¶
Index ¶
- type MongoClient
- func (c *MongoClient) AddData(insert interface{}) error
- func (c *MongoClient) DeleteData(filter bson.D) error
- func (c *MongoClient) GetAll(filter bson.D, returnData interface{}) error
- func (c *MongoClient) GetData(filter bson.D, returnData interface{}) error
- func (c *MongoClient) UpdateData(filter bson.D, update bson.D) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoClient ¶
type MongoClient struct { Client *mongo.Client Collection *mongo.Collection }
func ConnectMongo ¶
func ConnectMongo(mongoUrl string, dbName, collectionName string) *MongoClient
func (*MongoClient) AddData ¶
func (c *MongoClient) AddData(insert interface{}) error
func (*MongoClient) DeleteData ¶
func (c *MongoClient) DeleteData(filter bson.D) error
func (*MongoClient) GetAll ¶
func (c *MongoClient) GetAll(filter bson.D, returnData interface{}) error
func (*MongoClient) GetData ¶
func (c *MongoClient) GetData(filter bson.D, returnData interface{}) error
func (*MongoClient) UpdateData ¶
Click to show internal directories.
Click to hide internal directories.