make service handling of non-error-not-founds explicit

This commit is contained in:
ari melody 2026-07-31 10:40:50 +01:00
parent 6eb204bfce
commit 32bcb894ee
Signed by: ari
GPG key ID: CF99829C92678188
2 changed files with 24 additions and 3 deletions

View file

@ -5,6 +5,8 @@ import "arimelody-web/model"
type AccountRepository interface {
GetAll() ([]*model.Account, error)
GetCount() (int, error)
// Fetches an account by ID, returning an error if one was encountered.
// If the account does not exist, both response fields are nil.
GetByID(id string) (*model.Account, error)
GetByUsername(username string) (*model.Account, error)
GetByEmail(email string) (*model.Account, error)