2021-07-30 17:46:38 +02:00
|
|
|
package server
|
|
|
|
|
|
|
|
type Store interface {
|
2021-08-23 21:43:05 +02:00
|
|
|
GetPeer(peerKey string) (*Peer, error)
|
|
|
|
DeletePeer(accountId string, peerKey string) (*Peer, error)
|
|
|
|
SavePeer(accountId string, peer *Peer) error
|
2021-07-30 17:46:38 +02:00
|
|
|
GetAccount(accountId string) (*Account, error)
|
2021-12-27 13:17:15 +01:00
|
|
|
GetUserAccount(userId string) (*Account, error)
|
2021-09-07 18:36:46 +02:00
|
|
|
GetAccountPeers(accountId string) ([]*Peer, error)
|
2021-08-23 21:43:05 +02:00
|
|
|
GetPeerAccount(peerKey string) (*Account, error)
|
2021-07-30 17:46:38 +02:00
|
|
|
GetAccountBySetupKey(setupKey string) (*Account, error)
|
|
|
|
SaveAccount(account *Account) error
|
|
|
|
}
|