Documentation ¶
Index ¶
- type MongoDB
- func (mongolib *MongoDB) Delete(collection string, filter interface{}) (*mongo.DeleteResult, error)
- func (mongolib *MongoDB) Edit(collection string, filter, data interface{}) (*mongo.UpdateResult, error)
- func (mongolib *MongoDB) Find(collection string) (*mongo.Cursor, context.Context, error)
- func (mongolib *MongoDB) FindOne(collection string, filter interface{}) (*mongo.SingleResult, error)
- func (mongolib *MongoDB) GetOne(collection string, filter interface{}) (*mongo.SingleResult, error)
- func (mongolib *MongoDB) InsertMany(collection string, data []interface{}) (*mongo.InsertManyResult, error)
- func (mongolib *MongoDB) InsertOne(collection string, data interface{}) (*mongo.InsertOneResult, error)
- type MongoDBInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoDB ¶
type MongoDB struct{}
MongoDB ...
func (*MongoDB) Delete ¶
func (mongolib *MongoDB) Delete(collection string, filter interface{}) (*mongo.DeleteResult, error)
Delete ..
func (*MongoDB) Edit ¶
func (mongolib *MongoDB) Edit(collection string, filter, data interface{}) (*mongo.UpdateResult, error)
Edit ...
func (*MongoDB) FindOne ¶
func (mongolib *MongoDB) FindOne(collection string, filter interface{}) (*mongo.SingleResult, error)
FindOne ...
func (*MongoDB) GetOne ¶
func (mongolib *MongoDB) GetOne(collection string, filter interface{}) (*mongo.SingleResult, error)
GetOne ...
func (*MongoDB) InsertMany ¶
func (mongolib *MongoDB) InsertMany(collection string, data []interface{}) (*mongo.InsertManyResult, error)
InsertMany ...
type MongoDBInterface ¶
type MongoDBInterface interface { InsertOne(collection string, data interface{}) (*mongo.InsertOneResult, error) InsertMany(collection string, data []interface{}) (*mongo.InsertManyResult, error) Find(collection string) (*mongo.Cursor, context.Context, error) FindOne(collection string, filter interface{}) (*mongo.SingleResult, error) GetOne(collection string, filter interface{}) (*mongo.SingleResult, error) Delete(collection string, filter interface{}) (*mongo.DeleteResult, error) Edit(collection string, filter, data interface{}) (*mongo.UpdateResult, error) }
MongoDBInterface ...
Click to show internal directories.
Click to hide internal directories.