2024-01-16 05:19:36 +00:00
|
|
|
package interfaces
|
|
|
|
|
2024-01-16 18:30:36 +00:00
|
|
|
import "git.lumeweb.com/LumeWeb/portal/db/models"
|
|
|
|
|
2024-01-16 05:19:36 +00:00
|
|
|
type AccountService interface {
|
2024-01-16 18:30:36 +00:00
|
|
|
EmailExists(email string) (bool, models.User)
|
|
|
|
PubkeyExists(pubkey string) (bool, models.PublicKey)
|
2024-01-17 13:35:42 +00:00
|
|
|
AccountExists(id uint64) (bool, models.User)
|
2024-01-16 18:30:36 +00:00
|
|
|
CreateAccount(email string, password string) (*models.User, error)
|
|
|
|
AddPubkeyToAccount(user models.User, pubkey string) error
|
|
|
|
LoginPassword(email string, password string) (string, error)
|
|
|
|
LoginPubkey(pubkey string) (string, error)
|
2024-01-17 17:32:50 +00:00
|
|
|
AccountPins(id uint64, createdAfter uint64) ([]models.Pin, error)
|
2024-01-17 18:03:52 +00:00
|
|
|
DeletePinByHash(hash string, accountID uint) error
|
2024-01-16 05:19:36 +00:00
|
|
|
}
|