mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 04:30:05 +00:00
update ws & settings api (#547)
This commit is contained in:
@@ -127,6 +127,21 @@ func (h *Host) PB() *pb.Host {
|
||||
}
|
||||
}
|
||||
|
||||
// Filter returns a new instance of Host with some fields redacted.
|
||||
func (h *Host) Filter() *Host {
|
||||
return &Host{
|
||||
Platform: h.Platform,
|
||||
CPU: h.CPU,
|
||||
MemTotal: h.MemTotal,
|
||||
DiskTotal: h.DiskTotal,
|
||||
SwapTotal: h.SwapTotal,
|
||||
Arch: h.Arch,
|
||||
Virtualization: h.Virtualization,
|
||||
BootTime: h.BootTime,
|
||||
GPU: h.GPU,
|
||||
}
|
||||
}
|
||||
|
||||
func PB2Host(h *pb.Host) Host {
|
||||
return Host{
|
||||
Platform: h.GetPlatform(),
|
||||
|
||||
Reference in New Issue
Block a user