mirror of
https://github.com/Walter-Sparrow/lunar-tear.git
synced 2026-07-02 05:43:41 +03:00
Add authentication server, dev CLI, Docker multi-service setup, and cross-platform improvements
This commit is contained in:
@@ -3,6 +3,8 @@ package store
|
||||
import (
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
"lunar-tear/server/internal/model"
|
||||
)
|
||||
|
||||
var ErrNotFound = errors.New("store: not found")
|
||||
@@ -10,11 +12,16 @@ var ErrNotFound = errors.New("store: not found")
|
||||
type Clock func() time.Time
|
||||
|
||||
type UserRepository interface {
|
||||
CreateUser(uuid string) (int64, error)
|
||||
CreateUser(uuid string, platform model.ClientPlatform) (int64, error)
|
||||
GetUserByUUID(uuid string) (int64, error)
|
||||
LoadUser(userId int64) (UserState, error)
|
||||
UpdateUser(userId int64, mutate func(*UserState)) (UserState, error)
|
||||
DefaultUserId() (int64, error)
|
||||
SetFacebookId(userId int64, facebookId int64) error
|
||||
GetUserByFacebookId(facebookId int64) (int64, error)
|
||||
GetFacebookId(userId int64) (int64, error)
|
||||
ClearFacebookId(userId int64) error
|
||||
UpdateUUID(userId int64, newUuid string) error
|
||||
}
|
||||
|
||||
type SessionRepository interface {
|
||||
|
||||
Reference in New Issue
Block a user