database

package
v0.0.0-...-407fa1f Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUserToDb

func AddUserToDb(newuser models.NewUser) error

AddUserToDb adds a new user to the database

func DbConnect

func DbConnect(DB_URI string) *mongo.Client

func DoesUserExist

func DoesUserExist(username string) (bool, error)

DoesUserExist checks if a user exists in the database

func GetPasswordHashFromDb

func GetPasswordHashFromDb(username string) (string, error)

GetPasswordHashFromDb gets the password hash from the database

func InitLoginCollection

func InitLoginCollection(client *mongo.Client, dbName, collName string) error

InitLoginCollection initializes the mongodb collection for login

Types

This section is empty.

Jump to

Keyboard shortcuts

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