feat(rcs): migrate all RCS APIs from rainyun-go-sdk

- 35 endpoints across 14 files, response structs split for reuse
- Reuse RcsRecord/Node/Plan/OsInfo/UsageData across list/detail/create
- Fix source bugs: {id} path placeholders, missing / in firewall pos path,
  missing body in ChargeRcsTrafic, resp vs &resp
- Add HTTPMethod_PATCH, common.BasicOperationResponse, VncConnectionInfo
This commit is contained in:
2026-08-05 22:35:28 +08:00
parent 0cd1a28f84
commit b8490ef422
20 changed files with 779 additions and 8 deletions
+19
View File
@@ -0,0 +1,19 @@
package common
import "strconv"
type VncConnectionInfo struct {
Code int `json:"code"`
Data VncConnectionData `json:"data"`
}
type VncConnectionData struct {
RequestURL string `json:"RequestURL"` // 空
RedirectURL string `json:"RedirectURL"` // 空
PVEAuth string `json:"PVEAuth"` // 空
VNCProxyURL string `json:"VNCProxyURL"` // PVE代理地址(连接地址),里面会有一个unicode码(\u0026)(&),转码后就是可以直接在浏览器上使用的VNC连接地址
}
func GetVncConnectURL(v *VncConnectionInfo) (string, error) {
return strconv.Unquote(v.Data.VNCProxyURL)
}