Documentation ¶
Index ¶
- func CompressTar(srcDirPath string, destFilePath string) error
- func CompressZip(fileDir string, outputPath string) error
- func FromLocal(localPath string) string
- type SSH
- func (ss *SSH) Cmd(host string, cmd string) []byte
- func (ss *SSH) CmdToString(host, cmd, spilt string) string
- func (ss *SSH) Connect(host string) (*ssh.Session, error)
- func (ss *SSH) Copy(host, localFilePath, remoteFilePath string)
- func (ss *SSH) CopyConfigFile(host, remoteFilePath string, localFilePathOrBytes interface{})
- func (ss *SSH) CopyForMD5(host, localFilePath, remoteFilePath, md5 string) bool
- func (ss *SSH) CopyRemoteFileToLocal(host, localFilePath, remoteFilePath string)
- func (ss *SSH) Md5Sum(host, remoteFilePath string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompressTar ¶
func CompressZip ¶
CompressZip is compress all file in fileDir , and zip to outputPath like unix zip ./ -r a.zip
Types ¶
type SSH ¶
type SSH struct { User string Password string PkFile string PkPassword string Timeout *time.Duration }
func (*SSH) CmdToString ¶
CmdToString is in host exec cmd and replace to spilt str
func (*SSH) CopyConfigFile ¶
CopyConfigFile is copy local file or bytes to remote file path
func (*SSH) CopyForMD5 ¶
Copy is
func (*SSH) CopyRemoteFileToLocal ¶
CopyRemoteFileToLocal is scp remote file to local
Click to show internal directories.
Click to hide internal directories.