Documentation ¶
Index ¶
- func ConnectDB() error
- func DisconnectDB()
- func GetDBClient() *mongo.Client
- func MongoCreate[T any](mongoCollecion *mongo.Collection, doc T) (T, error)
- func MongoFindAll[T any](mongoCollecion *mongo.Collection, doc T) ([]T, error)
- func MongoFindOne[T any](mongoCollecion *mongo.Collection, doc T, filter primitive.M) (T, error)
- func MongoFindOneAndUpdate[T any](mongoCollecion *mongo.Collection, doc T, filter primitive.M, ...) (T, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisconnectDB ¶
func DisconnectDB()
func GetDBClient ¶
func MongoCreate ¶
func MongoCreate[T any](mongoCollecion *mongo.Collection, doc T) (T, error)
func MongoFindAll ¶
func MongoFindAll[T any](mongoCollecion *mongo.Collection, doc T) ([]T, error)
func MongoFindOne ¶
func MongoFindOneAndUpdate ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.