-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
60 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package controllers | ||
|
||
import ( | ||
"rustdesk-api-server/utils/beegoHelper" | ||
"time" | ||
) | ||
|
||
type HeartController struct { | ||
BaseController | ||
} | ||
|
||
// 心跳检测 POST | ||
func (ctl *HeartController) Heart() { | ||
|
||
ctl.JSON(beegoHelper.H{ | ||
"modified_at": time.Now().Unix(), | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,30 @@ | ||
package dto | ||
|
||
// { | ||
// "username": "1g", | ||
// "password": "21g2", | ||
// "id": "1089363550", | ||
// "uuid": "M0Y4MkI3N0MtMDMwMy01N0EwLTg5MzAtNDcwNUI4NUNFNUZD", | ||
// "autoLogin": true, | ||
// "type": "account", | ||
// "verificationCode": "", | ||
// "deviceInfo": { | ||
// "os": "macos", | ||
// "type": "client", | ||
// "name": "xiaoyi510deimac.local" | ||
// } | ||
// } | ||
type LoginReq struct { | ||
Username string `json:"username"` | ||
Password string `json:"password"` | ||
ClientId string `json:"id"` | ||
Uuid string `json:"uuid"` | ||
Username string `json:"username"` | ||
Password string `json:"password"` | ||
Id string `json:"id"` | ||
Uuid string `json:"uuid"` | ||
AutoLogin bool `json:"autoLogin"` | ||
Type string `json:"type"` | ||
VerificationCode string `json:"verificationCode"` | ||
DeviceInfo struct { | ||
Os string `json:"os"` | ||
Type string `json:"type"` | ||
Name string `json:"name"` | ||
} `json:"deviceInfo"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
appname = rustdesk-api-server | ||
|
||
# 监听IP | ||
HTTPAddr = 127.0.0.1 | ||
HTTPAddr = 0.0.0.0 | ||
|
||
# 端口号 | ||
httpport = 21114 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
package common | ||
|
||
type JsonResult struct { | ||
Code int `json:"code"` | ||
Msg string `json:"msg"` | ||
Code int `json:"code,omitempty"` | ||
Msg string `json:"msg,omitempty"` | ||
Error string `json:"error,omitempty"` | ||
Data interface{} `json:"data"` | ||
Data interface{} `json:"data,omitempty"` | ||
Count int64 `json:"count,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters