further tidying up account service/repo

This commit is contained in:
ari melody 2026-07-31 11:04:36 +01:00
parent 32bcb894ee
commit 9e311df462
Signed by: ari
GPG key ID: CF99829C92678188
4 changed files with 26 additions and 38 deletions

View file

@ -18,13 +18,13 @@ type AccountRepository interface {
// Create an account, returning the new account ID.
Create(username string, password string, email *string, avatarURL *string) (string, error)
// Deprecated in favour of more specialised Change* and Remove* functions.
// Deprecated in favour of more specialised Update* and Remove* functions.
Update(id string, username string, password string, email *string, avatarUrl *string) error
ChangeUsername(id string, username string) error
ChangePassword(id string, password string) error
ChangeEmail(id string, email string) error
UpdateUsername(id string, username string) error
UpdatePassword(id string, password string) error
UpdateEmail(id string, email string) error
RemoveEmail(id string) error
ChangeAvatarURL(id string, avatarURL string) error
UpdateAvatarURL(id string, avatarURL string) error
RemoveAvatar(id string) error
Delete(id string) error
@ -33,6 +33,5 @@ type AccountRepository interface {
// returning the current fail count.
IncrementFails(id string) (int, error)
ResetFails(id string) error
Lock(id string) error
Unlock(id string) error
SetLocked(id string, lock bool) error
}