sshtool

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sshtool

type Sshtool struct {
	// contains filtered or unexported fields
}

func NewSshtool

func NewSshtool(ip string, username string, passward string, timeout string) (*Sshtool, error)

func (*Sshtool) Close

func (p *Sshtool) Close() error

func (*Sshtool) Copy

func (p *Sshtool) Copy(r io.Reader, remotePath string, permissions string, size int64, verbose bool) error

func (*Sshtool) CopyFile

func (p *Sshtool) CopyFile(fileReader io.Reader, remotePath string, permissions string, verbose bool) error

func (*Sshtool) Exec

func (p *Sshtool) Exec(cmd string, verbose bool) error

func (*Sshtool) Mkdir

func (p *Sshtool) Mkdir(path string, verbose bool) error

func (*Sshtool) OsType

func (p *Sshtool) OsType(verbose bool) (string, error)

query linux os distributed version, inclue ubuntu, centos, aliyun, fedora, debian, raspbian

func (*Sshtool) Query

func (p *Sshtool) Query(cmd string, verbose bool) (string, error)

func (*Sshtool) RmDir

func (p *Sshtool) RmDir(remoteDir string, verbose bool) error

func (*Sshtool) Sh

func (p *Sshtool) Sh(shFilePath string, verbose bool) error

Jump to

Keyboard shortcuts

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