database

package
v0.0.0-...-7e74fd6 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(app *config.Application) *mongo.Database

openDB creates a new database connection and returns the Database

Types

type DatabaseRepository

type DatabaseRepository interface {
	CreateUser(user models.User) (*string, error)
	GetAllUsers() ([]*models.User, error)
	GetUserById(id string) (*models.User, error)
	GetUserByUsername(username string) (*models.User, error)
	UpdateUser(id string, user models.User) error
	UpdatePasswordResetToken(id string, user models.User) error
}

func NewRepo

func NewRepo(app *config.Application, conn *mongo.Database) DatabaseRepository

Jump to

Keyboard shortcuts

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