Versions in this module Expand all Collapse all v0 v0.1.1 Nov 13, 2020 v0.1.0 Nov 13, 2020 Changes in this version + 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 func(CommandOperator) error + type CommandOperator interface + Execute func(command string) (CommandRes, error) + Upload func(src io.Reader, remotePath string, mode string) error + UploadFile func(path string, remotePath string, mode string) error + type CommandRes struct + StdErr []byte + StdOut []byte + type LocalOperator struct + func NewLocalOperator() *LocalOperator + func (e LocalOperator) Execute(command string) (CommandRes, error) + func (e LocalOperator) Upload(source io.Reader, remotePath string, mode string) error + func (e LocalOperator) UploadFile(path string, remotePath string, mode string) error + type SSHOperator struct + func NewSSHOperator(address string, config *ssh.ClientConfig) (*SSHOperator, error) + func (s SSHOperator) Close() error + func (s SSHOperator) Execute(command string) (CommandRes, error) + func (s SSHOperator) Upload(source io.Reader, remotePath string, mode string) error + func (s SSHOperator) UploadFile(path string, remotePath string, mode string) error