🎨做了一些bug修复和变动
This commit is contained in:
@@ -5,6 +5,11 @@ import "wireguard-dashboard/model/template_data"
|
||||
// ClientList
|
||||
// @description: 客户端列表
|
||||
type ClientList struct {
|
||||
Name string `json:"name" form:"name"`
|
||||
Email string `json:"email" form:"email"`
|
||||
Ip string `json:"ip" form:"ip"`
|
||||
CreateUser string `json:"createUser" form:"createUser"`
|
||||
Enabled *int `json:"enabled" form:"enabled"`
|
||||
page
|
||||
}
|
||||
|
||||
@@ -26,10 +31,10 @@ type SaveClient struct {
|
||||
AllowedIPS []string `json:"allowedIPS" form:"allowedIPS" binding:"required"`
|
||||
ExtraAllowedIPS []string `json:"extraAllowedIPS" form:"extraAllowedIPS" binding:"omitempty"`
|
||||
Endpoint string `json:"endpoint" form:"endpoint" binding:"omitempty"`
|
||||
UseServerDNS int `json:"useServerDNS" form:"useServerDNS" binding:"required,oneof=1 0"`
|
||||
EnabledAfterCreation int `json:"enabledAfterCreation" form:"enabledAfterCreation" binding:"required,oneof=1 0"`
|
||||
UseServerDNS *int `json:"useServerDNS" form:"useServerDNS" binding:"required,oneof=1 0"`
|
||||
EnabledAfterCreation *int `json:"enableAfterCreation" form:"enableAfterCreation" binding:"required,oneof=1 0"`
|
||||
Keys *template_data.Keys `json:"keys" form:"keys" binding:"omitempty"`
|
||||
Enabled int `json:"enabled" form:"enabled" binding:"required,oneof=1 0"`
|
||||
Enabled *int `json:"enabled" form:"enabled" binding:"required,oneof=1 0"`
|
||||
}
|
||||
|
||||
// ControlServer
|
||||
|
@@ -1,10 +1,10 @@
|
||||
package param
|
||||
|
||||
type SaveServer struct {
|
||||
Id string `json:"id" form:"id" binding:"omitempty"` // id
|
||||
IpScope []string `json:"ipScope" form:"ipScope" binding:"required"` // 内网ip范围段
|
||||
ListenPort int `json:"listenPort" form:"listenPort" binding:"required"` // 监听端口
|
||||
PostUpScript string `json:"postUpScript" form:"postUpScript" binding:"omitempty"`
|
||||
PreDownScript string `json:"preDownScript" form:"preDownScript" binding:"omitempty"`
|
||||
PostDownScript string `json:"postDownScript" form:"postDownScript" binding:"omitempty"`
|
||||
Id string `json:"id" form:"id" binding:"omitempty"` // id
|
||||
IpScope string `json:"ipScope" form:"ipScope" binding:"required"` // 内网ip范围段
|
||||
ListenPort int `json:"listenPort" form:"listenPort" binding:"required"` // 监听端口
|
||||
PostUpScript string `json:"postUpScript" form:"postUpScript" binding:"omitempty"`
|
||||
PreDownScript string `json:"preDownScript" form:"preDownScript" binding:"omitempty"`
|
||||
PostDownScript string `json:"postDownScript" form:"postDownScript" binding:"omitempty"`
|
||||
}
|
||||
|
@@ -11,13 +11,11 @@ type SetSetting struct {
|
||||
// SetServerGlobal
|
||||
// @description: 设置服务端全局配置
|
||||
type SetServerGlobal struct {
|
||||
Data struct {
|
||||
EndpointAddress string `json:"endpointAddress" binding:"required"` // 服务公网IP
|
||||
DnsServer []string `json:"dnsServer" binding:"required"` // DNS列表
|
||||
MTU int `json:"MTU" binding:"required"`
|
||||
PersistentKeepalive int `json:"persistentKeepalive" binding:"omitempty"`
|
||||
FirewallMark string `json:"firewallMark" binding:"omitempty"`
|
||||
Table string `json:"table" binding:"omitempty"`
|
||||
ConfigFilePath string `json:"configFilePath" binding:"required"` // 配置文件对外输出目录
|
||||
} `json:"data"`
|
||||
EndpointAddress string `json:"endpointAddress" binding:"required"` // 服务公网IP
|
||||
DnsServer []string `json:"dnsServer" binding:"required"` // DNS列表
|
||||
MTU int `json:"MTU" binding:"required"`
|
||||
PersistentKeepalive int `json:"persistentKeepalive" binding:"omitempty"`
|
||||
FirewallMark string `json:"firewallMark" binding:"omitempty"`
|
||||
Table string `json:"table" binding:"omitempty"`
|
||||
ConfigFilePath string `json:"configFilePath" binding:"required"` // 配置文件对外输出目录
|
||||
}
|
||||
|
Reference in New Issue
Block a user