utils

package
v0.0.0-...-4a7ee20 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2020 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package utils provides database utility function.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseMongoClient

func CloseMongoClient(client *mongo.Client, ctx *context.Context)

CloseMongoClient closes a MongoDB connection.

func ClosePostgreClient

func ClosePostgreClient(client *gorm.DB)

ClosePostgreClient closes a PostgreSQL connection.

func NewMongoClient

func NewMongoClient() (*mongo.Client, *context.Context)

NewMongoClient connects to a MongoDB database and returns the connection object along with the context.

func NewPostgreClient

func NewPostgreClient() *gorm.DB

NewPostgreClient connects to a PostgreSQL database and returns the connection object.

Types

This section is empty.

Jump to

Keyboard shortcuts

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