util

package
v0.0.0-...-9a10ecf Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2019 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticateUser

func AuthenticateUser(user string, pass string) (bool, error)

AuthenticateUser is the function that checks if the given user and password are valid or not

func CheckIfUserExists

func CheckIfUserExists(username string) (bool, error)

CheckIfUserExists checks if there is an user with the given username on db

func InitDatabase

func InitDatabase() error

InitDatabase initiates API Database by creating Users table.

func NewUser

func NewUser(user string, pass string, passcheck string) (bool, error)

NewUser registers a new user to the db

func OpenDBConnection

func OpenDBConnection() (*sql.DB, error)

OpenDBConnection establish a connection with the MySQL DB.

Types

This section is empty.

Jump to

Keyboard shortcuts

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