feat: initial commit of vps-commander release v1.0.0

This commit is contained in:
kory
2026-09-28 07:48:01 +08:00
commit 467e28a6a1
48 changed files with 3851 additions and 0 deletions
+54
View File
@@ -0,0 +1,54 @@
package model
type ExecRequest struct {
Device string `json:"device,omitempty"`
Command string `json:"command"`
Workdir string `json:"workdir,omitempty"`
Timeout int `json:"timeout,omitempty"`
}
type ExecResponse struct {
Device string `json:"device"`
ExitCode int `json:"exit_code"`
Stdout string `json:"stdout"`
Stderr string `json:"stderr"`
DurationMS int64 `json:"duration_ms"`
}
type Device struct {
Name string `json:"name"`
Status string `json:"status"`
Local bool `json:"is_local"`
Arch string `json:"arch,omitempty"`
OS string `json:"os,omitempty"`
}
type FileReadRequest struct {
Device string `json:"device,omitempty"`
Path string `json:"path"`
Offset int64 `json:"offset,omitempty"`
Limit int64 `json:"limit,omitempty"`
}
type FileReadResponse struct {
Device string `json:"device"`
Path string `json:"path"`
Offset int64 `json:"offset"`
Content string `json:"content"`
Bytes int64 `json:"bytes"`
TotalSize int64 `json:"total_size"`
HasMore bool `json:"has_more"`
EOF bool `json:"eof,omitempty"`
}
type FileWriteRequest struct {
Device string `json:"device,omitempty"`
Path string `json:"path"`
Content string `json:"content"`
}
type FileWriteResponse struct {
Device string `json:"device"`
Path string `json:"path"`
Bytes int64 `json:"bytes"`
}