Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Input ¶
type Input struct {
Host string `json:"host" validate:"required,hostname|ip"` // SSH host (required)
Port int `json:"port,omitempty" validate:"min=0,max=65535"` // SSH port (default: 22)
User string `json:"user,omitempty" validate:"omitempty,alphanum|contains=-|contains=_,max=32"` // SSH user (default: current user)
BinaryPath string `json:"binary_path,omitempty" validate:"omitempty,filepath"` // Local binary path to transfer (required for exec, optional for kill)
RemotePath string `json:"remote_path,omitempty" validate:"omitempty,max=4096"` // Remote destination path (default: /tmp/<filename>)
Args []string `json:"args,omitempty"` // Arguments to pass to the binary
KeepBinary bool `json:"keep_binary,omitempty"` // Keep binary after execution (default: false, meaning cleanup)
RunInBackground bool `json:"run_in_background,omitempty"` // Run process in background (default: false)
KillPID int `json:"kill_pid,omitempty" validate:"min=0,max=2147483647"` // PID to kill on remote host (mutually exclusive with exec)
KillByName string `json:"kill_by_name,omitempty" validate:"omitempty,max=255"` // Kill processes by name pattern (mutually exclusive with exec and kill_pid)
KillSignal string `json:"kill_signal,omitempty" validate:"omitempty,alpha,max=16"` // Signal to send when killing (default: TERM)
MaxLines int `json:"max_lines,omitempty" validate:"min=0,max=100000"` // Maximum lines to return (default: 1000)
Offset int `json:"offset,omitempty" validate:"min=0"` // Line offset for pagination
}
type Output ¶
type Output struct {
Host string `json:"host"`
Port int `json:"port"`
User string `json:"user"`
BinaryPath string `json:"binary_path"`
RemotePath string `json:"remote_path"`
Args []string `json:"args"`
Output string `json:"output"`
ExitCode int `json:"exit_code"`
TotalLines int `json:"total_lines"`
Offset int `json:"offset"`
MaxLines int `json:"max_lines"`
Truncated bool `json:"truncated"`
}
Click to show internal directories.
Click to hide internal directories.