Documentation ¶
Index ¶
- Constants
- func CheckForMail(email string, db *sql.DB) bool
- func CheckForUser(user string, db *sql.DB) int
- func CountUsers(db *sql.DB) (int, error)
- func CreateTables(db *sql.DB) (bool, error)
- func Delete(pwid int, category string, db *sql.DB) (bool, error)
- func GetStuff(uid int, category string, db *sql.DB) ([]string, []string, []string, []string)
- func GetUID(user string, db *sql.DB) int
- func InitDb() *sql.DB
- func Login(user string, passw string, db *sql.DB) bool
- func Register(user string, passw string, email string, db *sql.DB) int
- func Save(user string, passwd string, category string, uid int, db *sql.DB) bool
- func Update(id int, db *sql.DB, args ...string) (bool, bool, bool)
- func UpdatePw(password, email string, db *sql.DB) bool
Constants ¶
View Source
const DB string = "./server/database.db"
DB database file path
Variables ¶
This section is empty.
Functions ¶
func CheckForMail ¶
CheckForMail check if mail already exist
func CheckForUser ¶
CheckForUser check if already exist in the DB & returns the length of users array
func CountUsers ¶
CountUsers Count the number of user that we have in the Database
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.