Gluecode for database/handlers

This commit is contained in:
Imbus 2024-03-12 20:44:40 +01:00
parent ad4d439887
commit 9b67a580da
4 changed files with 55 additions and 6 deletions

View file

@ -12,7 +12,9 @@ import (
// Interface for the database
type Database interface {
// Insert a new user into the database, password should be hashed before calling
AddUser(username string, password string) error
RemoveUser(username string) error
PromoteToAdmin(username string) error
GetUserId(username string) (int, error)