mirror of
https://github.com/sipeed/NanoKVM.git
synced 2026-09-11 00:22:56 -05:00
53 lines
1.2 KiB
Go
53 lines
1.2 KiB
Go
package proto
|
|
|
|
type WakeOnLANReq struct {
|
|
Mac string `form:"mac" validate:"required"`
|
|
}
|
|
|
|
type GetMacRsp struct {
|
|
Macs []string `json:"macs"`
|
|
}
|
|
|
|
type DeleteMacReq struct {
|
|
Mac string `form:"mac" validate:"required"`
|
|
}
|
|
|
|
type SetMacNameReq struct {
|
|
Mac string `form:"mac" validate:"required"`
|
|
Name string `form:"name" validate:"required"`
|
|
}
|
|
|
|
type GetWifiRsp struct {
|
|
Supported bool `json:"supported"`
|
|
ApMode bool `json:"apMode"`
|
|
Connected bool `json:"connected"`
|
|
Ssid string `json:"ssid"`
|
|
}
|
|
|
|
type ConnectWifiReq struct {
|
|
Ssid string `validate:"required"`
|
|
Password string `validate:"required"`
|
|
}
|
|
|
|
type GetDNSRsp struct {
|
|
Mode string `json:"mode"`
|
|
Servers []string `json:"servers"`
|
|
Effective []string `json:"effective"`
|
|
DHCP []string `json:"dhcp"`
|
|
Info DNSInfo `json:"info"`
|
|
}
|
|
|
|
type SetDNSReq struct {
|
|
Mode string `json:"mode" validate:"required,oneof=manual dhcp"`
|
|
Servers []string `json:"servers"`
|
|
}
|
|
|
|
type DNSInfo struct {
|
|
Interface string `json:"interface"`
|
|
Type string `json:"type"`
|
|
Address string `json:"address"`
|
|
SubnetMask string `json:"subnetMask"`
|
|
Gateway string `json:"gateway"`
|
|
SearchDomains []string `json:"searchDomains"`
|
|
}
|