169 lines
4.4 KiB
Go
169 lines
4.4 KiB
Go
package main
|
|
|
|
type MessageInfo struct {
|
|
Id string `json:"id"`
|
|
Method string `json:"method"`
|
|
Params interface{}
|
|
}
|
|
|
|
type AddDeviceParam struct {
|
|
DeviceNo string `json:"deviceNo"`
|
|
DeviceName string `json:"deviceName"`
|
|
}
|
|
type MessageResponse struct {
|
|
Id string `json:"id"`
|
|
Method string `json:"method"`
|
|
Result interface{} `json:"result"`
|
|
}
|
|
|
|
type MessageErrorResponse struct {
|
|
Error *ErrorResponse `json:"error"`
|
|
Id string `json:"id"`
|
|
Method string `json:"method"`
|
|
Result interface{} `json:"result"`
|
|
}
|
|
|
|
type ErrorResponse struct {
|
|
Code int `json:"code"`
|
|
Message string `json:"message"`
|
|
}
|
|
|
|
type AddDeviceResponse struct {
|
|
Code int `json:"code"`
|
|
DeviceId int `json:"deviceId"`
|
|
}
|
|
|
|
type CheckVersionResponse struct {
|
|
Code int `json:"code"`
|
|
DownloadUrl string `json:"downloadUrl"`
|
|
IsUpdate bool `json:"isUpdate"`
|
|
NewVersion string `json:"newVersion"`
|
|
}
|
|
|
|
type GetDeviceRemoteControlInfoParam struct {
|
|
DeviceId int `json:"deviceId"`
|
|
DeviceNo string `json:"deviceNo"`
|
|
}
|
|
|
|
type GetDeviceRemoteControlInfoResponse struct {
|
|
Code int `json:"code"`
|
|
DeviceId int `json:"deviceId"`
|
|
IdentificationCode string `json:"identificationCode"`
|
|
ShareUrl string `json:"shareUrl"`
|
|
VerificationCode string `json:"verificationCode"`
|
|
}
|
|
|
|
type GetFileTransferConfigResponse struct {
|
|
Code int `json:"code"`
|
|
DownloadSpeedRatio int `json:"downloadSpeedRatio"`
|
|
UploadSpeedRatio int `json:"uploadSpeedRatio"`
|
|
}
|
|
|
|
type GetTurnTransferConfigResponse struct {
|
|
Code int `json:"code"`
|
|
VideoBitrate int `json:"videoBitrate"`
|
|
}
|
|
|
|
type LoginParam struct {
|
|
PhoneNo string `json:"phoneNo"`
|
|
Password string `json:"password"`
|
|
DeviceId int `json:"deviceId"`
|
|
}
|
|
|
|
type LoginResponse struct {
|
|
Code int `json:"code"`
|
|
Token string `json:"token"`
|
|
}
|
|
|
|
type GetDeviceResponse struct {
|
|
Code int `json:"code"`
|
|
Devices []*DeviceResponse `json:"devices"`
|
|
}
|
|
|
|
type DeviceResponse struct {
|
|
DeviceId int `json:"deviceId"`
|
|
DeviceName string `json:"deviceName"`
|
|
DeviceNo string `json:"deviceNo"`
|
|
OnlineState int `json:"onlineState"`
|
|
}
|
|
|
|
type StartRemoteControlParam struct {
|
|
Type int `json:"type"`
|
|
Token string `json:"token"`
|
|
RemoteDeviceId int `json:"remoteDeviceId"`
|
|
RemoteIdentificationCode string `json:"remoteIdentificationCode"`
|
|
RemoteVerificationCode string `json:"remoteVerificationCode"`
|
|
VerificationType int `json:"verificationType"`
|
|
UserName string `json:"userName"`
|
|
Password string `json:"password"`
|
|
}
|
|
type StartRemoteControlResponse struct {
|
|
Code int `json:"code"`
|
|
StreamingConfig StreamingConfig `json:"streamingConfig"`
|
|
}
|
|
|
|
type RemoteStartRemoteControlResponse struct {
|
|
Id string `json:"id"`
|
|
Method string `json:"method"`
|
|
Params RemoteStreamingConfig `json:"params"`
|
|
}
|
|
|
|
type NotifyResponse struct {
|
|
Id string `json:"id"`
|
|
Method string `json:"method"`
|
|
Params interface{} `json:"params"`
|
|
}
|
|
|
|
type EmptyObj struct {
|
|
}
|
|
|
|
type StreamingConfig struct {
|
|
ClientId string `json:"clientId"`
|
|
ClientIds []string `json:"clientIds"`
|
|
ServiceId string `json:"serviceId"`
|
|
SignalServer string `json:"signalServer"`
|
|
StunAddrs []string `json:"stunAddrs"`
|
|
Token string `json:"token"`
|
|
TurnAddrs []TurnServer `json:"turnAddrs"`
|
|
}
|
|
|
|
type RemoteStreamingConfig struct {
|
|
ClientId string `json:"clientId"`
|
|
SignalServer string `json:"signalServer"`
|
|
StunAddrs []string `json:"stunAddrs"`
|
|
Token string `json:"token"`
|
|
TurnAddrs []TurnServer `json:"turnAddrs"`
|
|
}
|
|
|
|
type GetDeviceVerificationTypeResponse struct {
|
|
Code int `json:"code"`
|
|
VerificationType int `json:"verificationType"`
|
|
}
|
|
|
|
type GetOnlineUsersResponse struct {
|
|
Code int `json:"code"`
|
|
DeviceId int `json:"deviceId"`
|
|
Users []OnlineUser `json:"users"`
|
|
}
|
|
|
|
type OnlineUser struct {
|
|
ClientId string `json:"clientId"`
|
|
ClientOS string `json:"clientOS"`
|
|
UserName string `json:"userName"`
|
|
VisitTime string `json:"visitTime"`
|
|
}
|
|
|
|
type SimpleResponse struct {
|
|
Code int `json:"code"`
|
|
}
|
|
|
|
type DeleteDeviceResponse struct {
|
|
Code int `json:"code"`
|
|
DeviceId int `json:"deviceId"`
|
|
}
|
|
|
|
type ForceClientOfflineParam struct {
|
|
ClientIds []string `json:"clientIds"`
|
|
Reason int `json:"reason"`
|
|
}
|