Documentation ¶
Index ¶
- func ExecuteLocal(callback Callback) error
- func ExecuteRemote(host string, port int, user string, callback Callback) error
- func ExecuteRemoteWithPassword(host string, port int, user string, password string, callback Callback) error
- func ExecuteRemoteWithPrivateKey(host string, port int, user string, privateKey string, callback Callback) error
- type Callback
- type CommandOperator
- type CommandRes
- type LocalOperator
- type SSHOperator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteLocal ¶
func ExecuteRemote ¶
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) (CommandRes, 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) (CommandRes, error)
func (SSHOperator) UploadFile ¶
func (s SSHOperator) UploadFile(path string, remotePath string, mode string) error
Click to show internal directories.
Click to hide internal directories.