usersrv

package
v0.0.0-...-52789aa Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2018 License: BSD-3-Clause Imports: 3 Imported by: 2

Documentation

Overview

Package usersrv handle user database operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(user *models.User) (bool, error)

Create a new user into the database. Return true if the username already exist.

func Edit

func Edit(userID string, user *models.User) (bool, error)

Edit a user in the database. Return true if the username already exist.

func Get

func Get(userID string) (*models.User, error)

Get a user from the database. Return nil if the user is not found.

func Login

func Login(username, password string) (*models.User, error)

Login made a lookup on the database base on username and perform password comparaison. It return nil if the username is unknown or the password mismatch.

Types

This section is empty.

Jump to

Keyboard shortcuts

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