meowlib/peer.go
2021-10-18 21:05:44 +02:00

28 lines
523 B
Go

package meow
import "time"
type Peer struct {
Me KeysArray
Name string
Visible bool
Password string
MessageNotification string
PublicKey string
PushServers []Server
OnionMode bool
Convdersation []Message
LastMessage time.Time
}
type PeerList []Peer
func (pl *PeerList) GetFromPublicKey(publickey string) *Peer {
for _, peer := range *pl {
if peer.PublicKey == publickey {
return &peer
}
}
return nil
}