Update peer status when login expires (#688)

Extend PeerStatus with an extra field LoginExpired, that can be stored in the database.
This commit is contained in:
Misha Bragin
2023-02-15 11:27:22 +01:00
committed by GitHub
parent 756ce96da9
commit d31219ba89
5 changed files with 68 additions and 7 deletions

View File

@@ -56,6 +56,7 @@ type AccountManager interface {
GetPeerByKey(peerKey string) (*Peer, error)
GetPeers(accountID, userID string) ([]*Peer, error)
MarkPeerConnected(peerKey string, connected bool) error
MarkPeerLoginExpired(peerPubKey string, loginExpired bool) error
DeletePeer(accountID, peerID, userID string) (*Peer, error)
GetPeerByIP(accountId string, peerIP string) (*Peer, error)
UpdatePeer(accountID, userID string, peer *Peer) (*Peer, error)