db

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2016 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckRefreshToken

func CheckRefreshToken(jti string) bool

func DeleteRefreshToken

func DeleteRefreshToken(jti string) error

func DeleteUser

func DeleteUser(uuid string)

func FetchUserById

func FetchUserById(uuid string) (models.User, error)

func FetchUserByUsername

func FetchUserByUsername(username string) (models.User, string, error)

returns the user and the userId or an error if not found

func InitDB

func InitDB()

func LogUserIn

func LogUserIn(username string, password string) (models.User, string, error)

func StoreRefreshToken

func StoreRefreshToken() (jti string, err error)

func StoreUser

func StoreUser(username string, password string, role string) (uuid string, err error)

password is hashed before getting here

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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