:toda:
This commit is contained in:
33
http/vo/client.go
Normal file
33
http/vo/client.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package vo
|
||||
|
||||
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"` // 子网范围段
|
||||
IpAllocation []string `json:"ipAllocation" gorm:"-"` // 分配的IP
|
||||
IpAllocationStr string `json:"-" gorm:"ipAllocationStr"`
|
||||
AllowedIps []string `json:"allowedIps" gorm:"-"` // 允许访问的IP
|
||||
AllowedIpsStr string `json:"-" gorm:"allowedIpsStr"`
|
||||
ExtraAllowedIps []string `json:"extraAllowedIps" gorm:"-"` // 其他允许访问的IP
|
||||
ExtraAllowedIpsStr string `json:"-" gorm:"extraAllowedIpsStr"`
|
||||
Endpoint string `json:"endpoint"` // 服务端点
|
||||
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"` // 更新时间
|
||||
}
|
||||
|
||||
type Keys struct {
|
||||
PrivateKey string `json:"privateKey"`
|
||||
PublicKey string `json:"publicKey"`
|
||||
PresharedKey string `json:"presharedKey"`
|
||||
}
|
28
http/vo/user.go
Normal file
28
http/vo/user.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package vo
|
||||
|
||||
import "wireguard-ui/global/constant"
|
||||
|
||||
// UserItem
|
||||
// @description: 用户列表的数据
|
||||
type UserItem struct {
|
||||
Id string `json:"id"`
|
||||
Account string `json:"account"`
|
||||
Nickname string `json:"nickname"`
|
||||
Avatar string `json:"avatar"`
|
||||
Contact string `json:"contact"`
|
||||
IsAdmin constant.UserType `json:"isAdmin"`
|
||||
Status constant.Status `json:"status"`
|
||||
}
|
||||
|
||||
// User
|
||||
// @description: 用户信息
|
||||
type User struct {
|
||||
Id string `json:"id"`
|
||||
Account string `json:"account"`
|
||||
Password string `json:"-"`
|
||||
Nickname string `json:"nickname"`
|
||||
Avatar string `json:"avatar"`
|
||||
Contact string `json:"contact"`
|
||||
IsAdmin constant.UserType `json:"isAdmin"`
|
||||
Status constant.Status `json:"status"`
|
||||
}
|
Reference in New Issue
Block a user