Files
rustdesk-api/http/response/api/webClient.go
T

32 lines
723 B
Go
Raw Normal View History

2024-09-13 15:57:29 +08:00
package api
import (
"Gwen/model"
"time"
)
type WebClientPeerPayload struct {
ViewStyle string `json:"view-style"`
Tm int64 `json:"tm"`
Info WebClientPeerInfoPayload `json:"info"`
}
type WebClientPeerInfoPayload struct {
Username string `json:"username"`
Hostname string `json:"hostname"`
Platform string `json:"platform"`
2024-09-24 10:15:04 +08:00
Hash string `json:"hash"`
2024-09-13 15:57:29 +08:00
}
func (wcpp *WebClientPeerPayload) FromAddressBook(a *model.AddressBook) {
wcpp.ViewStyle = "shrink"
2024-09-19 10:44:49 +08:00
//24小时前
wcpp.Tm = time.Now().Add(-time.Hour * 24).UnixNano()
2024-09-13 15:57:29 +08:00
wcpp.Info = WebClientPeerInfoPayload{
Username: a.Username,
Hostname: a.Hostname,
Platform: a.Platform,
2024-09-24 10:15:04 +08:00
Hash: a.Hash,
2024-09-13 15:57:29 +08:00
}
}