🎨客户端列表新增客户端数据流量情况
This commit is contained in:
@@ -5,10 +5,9 @@ import "wireguard-ui/model"
|
||||
// ClientItem
|
||||
// @description: 客户端信息
|
||||
type ClientItem struct {
|
||||
Id string `json:"id"` // id
|
||||
Name string `json:"name"` // 名称
|
||||
Email string `json:"email"` // 通知邮箱
|
||||
//SubnetRange string `json:"subnetRange"` // 子网范围段
|
||||
Id string `json:"id"` // id
|
||||
Name string `json:"name"` // 名称
|
||||
Email string `json:"email"` // 通知邮箱
|
||||
IpAllocation []string `json:"ipAllocation" gorm:"-"` // 分配的IP
|
||||
IpAllocationStr string `json:"-" gorm:"ipAllocationStr"`
|
||||
AllowedIps []string `json:"allowedIps" gorm:"-"` // 允许访问的IP
|
||||
@@ -19,11 +18,12 @@ type ClientItem struct {
|
||||
UseServerDns int `json:"useServerDns"` // 是否使用服务端DNS
|
||||
Keys *Keys `json:"keys" gorm:"-"` // 密钥等
|
||||
KeysStr string `json:"-" gorm:"keys_str"`
|
||||
CreateUser string `json:"createUser"` // 创建人
|
||||
Enabled int `json:"enabled"` // 是否启用
|
||||
OfflineMonitoring int `json:"offlineMonitoring"` // 离线通知
|
||||
CreatedAt model.JsonTime `json:"createdAt"` // 创建时间
|
||||
UpdatedAt model.JsonTime `json:"updatedAt"` // 更新时间
|
||||
CreateUser string `json:"createUser"` // 创建人
|
||||
Enabled int `json:"enabled"` // 是否启用
|
||||
OfflineMonitoring int `json:"offlineMonitoring"` // 离线通知
|
||||
DataTraffic *DataTraffic `json:"dataTraffic" gorm:"-"` // 数据流量
|
||||
CreatedAt model.JsonTime `json:"createdAt"` // 创建时间
|
||||
UpdatedAt model.JsonTime `json:"updatedAt"` // 更新时间
|
||||
}
|
||||
|
||||
type Keys struct {
|
||||
@@ -31,3 +31,13 @@ type Keys struct {
|
||||
PublicKey string `json:"publicKey"`
|
||||
PresharedKey string `json:"presharedKey"`
|
||||
}
|
||||
|
||||
// DataTraffic
|
||||
// @description: 数据流量
|
||||
type DataTraffic struct {
|
||||
Online bool `json:"online"` // 是否在线
|
||||
ReceiveBytes string `json:"receiveBytes"` // 接收流量
|
||||
TransmitBytes string `json:"transmitBytes"` // 传输流量
|
||||
ConnectEndpoint string `json:"connectEndpoint"` // 链接端点
|
||||
LastHandAt string `json:"lastHandAt"` // 最后握手时间
|
||||
}
|
||||
|
Reference in New Issue
Block a user