ssh

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandOperator

type CommandOperator interface {
	Execute(command string) (CommandRes, error)

	Upload(content string, remotePath string, permissions string) error

	UploadFile(path string, remotePath string, permissions string) error
}

type CommandRes

type CommandRes struct {
	StdOut []byte
	StdErr []byte
}

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) Upload

func (s SSHOperator) Upload(content string, remotePath string, permissions string) error

func (SSHOperator) UploadFile

func (s SSHOperator) UploadFile(path string, remotePath string, permissions string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL