Add database handlers

This commit is contained in:
Marco Realacci 2022-11-18 10:54:14 +01:00
parent 37b7fede91
commit 5f3d4df33a
4 changed files with 94 additions and 3 deletions

View file

@ -38,8 +38,19 @@ import (
// AppDatabase is the high level interface for the DB
type AppDatabase interface {
GetName() (string, error)
GetUserID(name string) (string, error)
SetName(name string) error
CreateUser(uid string, name string) error
FollowUser(uid string, follow string) error
UnfollowUser(uid string, unfollow string) error
BanUser(uid string, ban string) error
UnbanUser(uid string, unban string) error
PostPhoto(uid string) (int64, error)
LikePhoto(uid string, photo int64) error
UnlikePhoto(uid string, photo int64) error
GetUserProfile(uid string) (*UserProfile, error)
Ping() error
}