From 33fbaa930b3149313cdf5fd4b8c1448d7418d3a0 Mon Sep 17 00:00:00 2001 From: Callan Bryant Date: Mon, 10 Feb 2020 19:58:13 +0000 Subject: [PATCH] define initial peer type --- types.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 types.go diff --git a/types.go b/types.go new file mode 100644 index 0000000..5d32526 --- /dev/null +++ b/types.go @@ -0,0 +1,19 @@ +package dsnet + +import ( + "net" + "golang.zx2c4.com/wireguard/wgctrl/wgtypes" +) + +// see https://github.com/WireGuard/wgctrl-go/blob/master/wgtypes/types.go for definitions +type Peer struct { + Name string + Description string + PublicKey wgtypes.Key + PresharedKey wgtypes.Key + Endpoint *net.UDPAddr + LastHandshakeTime time.Time + ReceiveBytes int64 + TransmitBytes int64 + AllowedIPs []net.IPNet +}