MCPcopy Create free account
hub / github.com/PasarGuard/node / GetByEmail

Method GetByEmail

backend/wireguard/peer_store.go:111–119  ·  view source on GitHub ↗

GetByEmail returns the peer for a given email if it exists.

(email string)

Source from the content-addressed store, hash-verified

109
110// GetByEmail returns the peer for a given email if it exists.
111func (ps *PeerStore) GetByEmail(email string) *PeerInfo {
112 ps.mu.RLock()
113 defer ps.mu.RUnlock()
114
115 if key, exists := ps.emailToKey[email]; exists {
116 return clonePeerInfo(ps.peers[key])
117 }
118 return nil
119}
120
121// GetByKey returns a single peer by public key.
122func (ps *PeerStore) GetByKey(publicKey string) *PeerInfo {

Callers 7

mustUserPeerIPByFamilyFunction · 0.80
TestPeerStoreGetByEmailFunction · 0.80
handleUserStatsMethod · 0.80
GetUserOnlineStatsMethod · 0.80

Calls 1

clonePeerInfoFunction · 0.85

Tested by 3

mustUserPeerIPByFamilyFunction · 0.64
TestPeerStoreGetByEmailFunction · 0.64