Documentation ¶
Index ¶
- func GetMD5Hash(text string) string
- type DBWrapper
- type MongoDBWrapper
- func (wrapper *MongoDBWrapper) Close()
- func (wrapper *MongoDBWrapper) CreateDocument(database, collection string, document interface{}) (*mongo.InsertOneResult, error)
- func (wrapper *MongoDBWrapper) CreateDocuments(database, collection string, documents []interface{}) (*mongo.InsertManyResult, error)
- func (wrapper *MongoDBWrapper) Exists(database, collection string, filter interface{}) int64
- func (wrapper *MongoDBWrapper) GetDocument(database, collection string, filter interface{}) (*mongo.SingleResult, error)
- func (wrapper *MongoDBWrapper) GetDocumentWithUpdate(database, collection string, filter interface{}, update interface{}) (*mongo.SingleResult, error)
- func (wrapper *MongoDBWrapper) GetDocuments(database, collection string, filter interface{}) (*mongo.Cursor, error)
- func (wrapper *MongoDBWrapper) UpdateDocument(database, collection string, filter, update interface{}) (*mongo.UpdateResult, error)
- func (wrapper *MongoDBWrapper) UpdateDocuments(database, collection string, filter, update interface{}) (*mongo.UpdateResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMD5Hash ¶
Types ¶
type DBWrapper ¶
type DBWrapper struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
func NewDatabase() *DBWrapper
type MongoDBWrapper ¶
type MongoDBWrapper struct {
// contains filtered or unexported fields
}
func NewMongoDBWrapper ¶
func NewMongoDBWrapper(uri string, poolSize uint64) *MongoDBWrapper
func (*MongoDBWrapper) Close ¶
func (wrapper *MongoDBWrapper) Close()
func (*MongoDBWrapper) CreateDocument ¶
func (wrapper *MongoDBWrapper) CreateDocument(database, collection string, document interface{}) (*mongo.InsertOneResult, error)
func (*MongoDBWrapper) CreateDocuments ¶
func (wrapper *MongoDBWrapper) CreateDocuments(database, collection string, documents []interface{}) (*mongo.InsertManyResult, error)
func (*MongoDBWrapper) Exists ¶
func (wrapper *MongoDBWrapper) Exists(database, collection string, filter interface{}) int64
func (*MongoDBWrapper) GetDocument ¶
func (wrapper *MongoDBWrapper) GetDocument(database, collection string, filter interface{}) (*mongo.SingleResult, error)
func (*MongoDBWrapper) GetDocumentWithUpdate ¶
func (wrapper *MongoDBWrapper) GetDocumentWithUpdate(database, collection string, filter interface{}, update interface{}) (*mongo.SingleResult, error)
func (*MongoDBWrapper) GetDocuments ¶
func (wrapper *MongoDBWrapper) GetDocuments(database, collection string, filter interface{}) (*mongo.Cursor, error)
func (*MongoDBWrapper) UpdateDocument ¶
func (wrapper *MongoDBWrapper) UpdateDocument(database, collection string, filter, update interface{}) (*mongo.UpdateResult, error)
func (*MongoDBWrapper) UpdateDocuments ¶
func (wrapper *MongoDBWrapper) UpdateDocuments(database, collection string, filter, update interface{}) (*mongo.UpdateResult, error)
Click to show internal directories.
Click to hide internal directories.