database

package
v0.0.0-...-dd40e37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectDB

func ConnectDB() error

func DisconnectDB

func DisconnectDB()

func GetDBClient

func GetDBClient() *mongo.Client

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 MongoFindOne[T any](mongoCollecion *mongo.Collection, doc T, filter primitive.M) (T, error)

func MongoFindOneAndUpdate

func MongoFindOneAndUpdate[T any](mongoCollecion *mongo.Collection, doc T, filter primitive.M, update primitive.M) (T, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL