Phase3
This commit is contained in:
@@ -137,12 +137,76 @@ type ServerStopPayload struct {
|
||||
OperationMeta
|
||||
}
|
||||
|
||||
// ServerCommandPayload instructs the agent to run a console command via RCON.
|
||||
type ServerCommandPayload struct {
|
||||
OperationMeta
|
||||
Command string `json:"command"`
|
||||
}
|
||||
|
||||
// ServerLogsSubscribePayload instructs the agent to stream container logs.
|
||||
type ServerLogsSubscribePayload struct {
|
||||
OperationMeta
|
||||
TailLines int `json:"tailLines"`
|
||||
Follow bool `json:"follow"`
|
||||
}
|
||||
|
||||
// ServerLogPayload carries a single log line from a game server.
|
||||
type ServerLogPayload struct {
|
||||
OperationMeta
|
||||
Line string `json:"line"`
|
||||
Stream string `json:"stream"`
|
||||
}
|
||||
|
||||
// ServerFilesListPayload lists files in a server data directory.
|
||||
type ServerFilesListPayload struct {
|
||||
OperationMeta
|
||||
Path string `json:"path"`
|
||||
}
|
||||
|
||||
// ServerFilesReadPayload reads a file from the server data directory.
|
||||
type ServerFilesReadPayload struct {
|
||||
OperationMeta
|
||||
Path string `json:"path"`
|
||||
MaxBytes int `json:"maxBytes"`
|
||||
}
|
||||
|
||||
// ServerFilesWritePayload writes content to a file in the server data directory.
|
||||
type ServerFilesWritePayload struct {
|
||||
OperationMeta
|
||||
Path string `json:"path"`
|
||||
Content string `json:"content"`
|
||||
Create bool `json:"create"`
|
||||
}
|
||||
|
||||
// FileEntry describes a file or directory in a list response.
|
||||
type FileEntry struct {
|
||||
Name string `json:"name"`
|
||||
Path string `json:"path"`
|
||||
IsDir bool `json:"isDir"`
|
||||
Size int64 `json:"size"`
|
||||
ModifiedAt string `json:"modifiedAt"`
|
||||
}
|
||||
|
||||
// ServerFilesListResultPayload is the result of a files.list operation.
|
||||
type ServerFilesListResultPayload struct {
|
||||
Entries []FileEntry `json:"entries"`
|
||||
}
|
||||
|
||||
// ServerFilesReadResultPayload is the result of a files.read operation.
|
||||
type ServerFilesReadResultPayload struct {
|
||||
Path string `json:"path"`
|
||||
Content string `json:"content"`
|
||||
Truncated bool `json:"truncated"`
|
||||
}
|
||||
|
||||
// ServerOperationResultPayload reports the outcome of a lifecycle operation.
|
||||
type ServerOperationResultPayload struct {
|
||||
OperationMeta
|
||||
ResultCode string `json:"resultCode"`
|
||||
ErrorCode string `json:"errorCode,omitempty"`
|
||||
ErrorMessage string `json:"errorMessage,omitempty"`
|
||||
ResultCode string `json:"resultCode"`
|
||||
Operation string `json:"operation,omitempty"`
|
||||
Result json.RawMessage `json:"result,omitempty"`
|
||||
ErrorCode string `json:"errorCode,omitempty"`
|
||||
ErrorMessage string `json:"errorMessage,omitempty"`
|
||||
}
|
||||
|
||||
// ServerStatePayload reports the observed server state.
|
||||
|
||||
Reference in New Issue
Block a user