wireguard-dashboard/http/vo/setting.go

53 lines
1.6 KiB
Go

package vo
// SettingItem
// @description: 设置单项
type SettingItem struct {
Code string `json:"code"`
Data string `json:"data"`
Describe string `json:"describe"`
}
type Export struct {
Global Global `json:"global"`
Server Server `json:"server"`
Clients []Client `json:"clients"`
}
type Global struct {
MTU int `json:"MTU"`
ConfigFilePath string `json:"configFilePath"`
DnsServer []string `json:"dnsServer"`
EndpointAddress string `json:"endpointAddress"`
FirewallMark string `json:"firewallMark"`
PersistentKeepalive int `json:"persistentKeepalive"`
Table string `json:"table"`
}
type Server struct {
IpScope []string `json:"ipScope"`
ListenPort int `json:"listenPort"`
PrivateKey string `json:"privateKey"`
PublicKey string `json:"publicKey"`
PostUpScript string `json:"postUpScript"`
PostDownScript string `json:"postDownScript"`
}
type Client struct {
Name string `json:"name"`
Email string `json:"email"`
SubnetRange string `json:"subnetRange"`
IpAllocation []string `json:"ipAllocation"`
AllowedIps []string `json:"allowedIps"`
ExtraAllowedIps []string `json:"extraAllowedIps"`
Endpoint string `json:"endpoint"`
UseServerDns int `json:"useServerDns"`
Keys struct {
PresharedKey string `json:"presharedKey"`
PrivateKey string `json:"privateKey"`
PublicKey string `json:"publicKey"`
} `json:"keys"`
Enabled int `json:"enabled"`
OfflineMonitoring int `json:"offlineMonitoring"`
}