dao

package
v0.0.0-...-a214acc Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	COLLECTION = "users"
)

Variables

This section is empty.

Functions

func Connect

func Connect()

Parse the configuration file 'config.toml', and establish a connection to DB

func Delete

func Delete(user models.User) error

Delete an existing user

func FindAll

func FindAll() ([]models.User, error)

Find list of users

func FindByEmailId

func FindByEmailId(email string, username string) (models.User, error)

Find a user by its email id

func FindById

func FindById(id string) (models.User, error)

Find a user by its id

func Insert

func Insert(user models.User) error

Insert a user into database

func PopulateIndex

func PopulateIndex()

Ensure Indexes on keys

func Update

func Update(user models.User) error

Update an existing user

Types

This section is empty.

Jump to

Keyboard shortcuts

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