database

package
v0.0.0-...-8de5691 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UsersCollection = "users"
	ChatsCollection = "chats"
)

Functions

func GetMongoDBInstance

func GetMongoDBInstance(mongoConfigs config.Mongo) (*mongo.Database, error)

func GetRedisDBInstance

func GetRedisDBInstance(redisConfigs config.Redis) *redis.Client

func IsDuplicateKeyError

func IsDuplicateKeyError(err error) bool

func IsRowExistsError

func IsRowExistsError(err error) bool

func NewMongoDBConnectionString

func NewMongoDBConnectionString(host string, port int, username string, password string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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