mirror of
https://github.com/vx3r/wg-gen-web.git
synced 2025-09-11 12:24:27 +00:00
Integrate https://github.com/jamescun/wg-api stats into the UI
This commit is contained in:
29
model/status.go
Normal file
29
model/status.go
Normal file
@ -0,0 +1,29 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// ClientStatus structure
|
||||
type ClientStatus struct {
|
||||
PublicKey string `json:"publicKey"`
|
||||
HasPresharedKey bool `json:"hasPresharedKey"`
|
||||
ProtocolVersion int `json:"protocolVersion"`
|
||||
Name string `json:"name"`
|
||||
Email string `json:"email"`
|
||||
Connected bool `json:"connected"`
|
||||
AllowedIPs []string `json:"allowedIPs"`
|
||||
Endpoint string `json:"endpoint"`
|
||||
LastHandshake time.Time `json:"lastHandshake"`
|
||||
ReceivedBytes int `json:"receivedBytes"`
|
||||
TransmittedBytes int `json:"transmittedBytes"`
|
||||
}
|
||||
|
||||
// InterfaceStatus structure
|
||||
type InterfaceStatus struct {
|
||||
Name string `json:"name"`
|
||||
DeviceType string `json:"type"`
|
||||
ListenPort int `json:"listenPort"`
|
||||
NumberOfPeers int `json:"numPeers"`
|
||||
PublicKey string `json:"publicKey"`
|
||||
}
|
Reference in New Issue
Block a user