Documentation ¶
Index ¶
- func ExecuteLocal(callback Callback) error
- func ExecuteRemote(host string, user string, privateKey string, password string, ...) error
- type Callback
- type CommandOperator
- type CommandRes
- type LocalOperator
- type SSHOperator
- func (s SSHOperator) Close() error
- func (s SSHOperator) Execute(command string) error
- func (s SSHOperator) Output(command string) (output []byte, err error)
- func (s SSHOperator) Upload(source io.Reader, remotePath string, mode string) error
- func (s SSHOperator) UploadFile(path string, remotePath string, mode string) error
- type SshAgentError
- type TargetConnectError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteLocal ¶
Types ¶
type Callback ¶
type Callback func(CommandOperator) error
type CommandOperator ¶
type CommandRes ¶
type LocalOperator ¶
type LocalOperator struct { }
func NewLocalOperator ¶
func NewLocalOperator() *LocalOperator
func (LocalOperator) Execute ¶
func (e LocalOperator) Execute(command string) error
func (LocalOperator) UploadFile ¶
func (e LocalOperator) UploadFile(path string, remotePath string, mode string) error
type SSHOperator ¶
type SSHOperator struct {
// contains filtered or unexported fields
}
func NewSSHOperator ¶
func NewSSHOperator(address string, config *ssh.ClientConfig) (*SSHOperator, error)
func (SSHOperator) Close ¶
func (s SSHOperator) Close() error
func (SSHOperator) Execute ¶
func (s SSHOperator) Execute(command string) error
func (SSHOperator) UploadFile ¶
func (s SSHOperator) UploadFile(path string, remotePath string, mode string) error
type SshAgentError ¶
type SshAgentError struct {
// contains filtered or unexported fields
}
func NewSshAgentError ¶
func NewSshAgentError(message error) *SshAgentError
func (*SshAgentError) Error ¶
func (e *SshAgentError) Error() string
type TargetConnectError ¶
type TargetConnectError struct {
// contains filtered or unexported fields
}
func NewTargetConnectError ¶
func NewTargetConnectError(message error) *TargetConnectError
func (*TargetConnectError) Error ¶
func (e *TargetConnectError) Error() string
Click to show internal directories.
Click to hide internal directories.