Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ShellOptions ¶
type ShellOptions struct {
Shell string `json:"shell,omitempty"`
In string `json:"in,omitempty"`
Ins []string `json:"ins,omitempty"`
Env []string `json:"env,omitempty"`
Timeout int `json:"timeout,omitempty"`
SecretID string `json:"secretId,omitempty"`
}
ShellOptions how to run the a shell command
func DefaultBashCommandOptions ¶
func DefaultBashCommandOptions() ShellOptions
DefaultBashCommandOptions default for running with bash
type ShellResult ¶
type ShellResult struct {
Code int `json:"code,omitempty"`
Out string `json:"out,omitempty"`
Err string `json:"err,omitempty"`
}
ShellResult reponse of the shell action
func RunRemoteShell ¶
func RunRemoteShell(sshConf ShellSSHConfig, cmd string) (*ShellResult, error)
RunRemoteShell execute a command on remote shell
func RunShellCommand ¶
func RunShellCommand(commandToRun string, cmdOpt ...ShellOptions) (*ShellResult, error)
RunShellCommand execute a command using the shell
type ShellSSHConfig ¶
type ShellSSHConfig struct {
Address string `json:"address,omitempty"`
User string `json:"user,omitempty"`
Password string `json:"password,omitempty"`
PrivateKeyFile string `json:"privateKeyFile,omitempty"`
Passphrase string `json:"passphrase,omitempty"`
SecretID string `json:"secretId,omitempty"`
}
ShellSSHConfig connection configuration
Click to show internal directories.
Click to hide internal directories.