Documentation ¶
Index ¶
- type ClientConfig
- func (cliConf *ClientConfig) CreateClient(host string, port int64, username, password string) error
- func (cliConf *ClientConfig) Run(shell string) (string, string, int, error)
- func (cliConf *ClientConfig) SftpClientClose() error
- func (cliConf *ClientConfig) SshClientClose() error
- func (cliConf *ClientConfig) UploadByte(localFileByte []byte, fileName string, remotePath string) (int, error)
- func (cliConf *ClientConfig) UploadFile(localFilePath string, remotePath string) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConfig ¶
type ClientConfig struct { Host string //ip Port int64 // 端口 Username string //用户名 Password string //密码 LastResult string //最近一次运行的结果 // contains filtered or unexported fields }
连接的配置
func (*ClientConfig) CreateClient ¶
func (cliConf *ClientConfig) CreateClient(host string, port int64, username, password string) error
func (*ClientConfig) SftpClientClose ¶
func (cliConf *ClientConfig) SftpClientClose() error
func (*ClientConfig) SshClientClose ¶
func (cliConf *ClientConfig) SshClientClose() error
func (*ClientConfig) UploadByte ¶
func (*ClientConfig) UploadFile ¶
func (cliConf *ClientConfig) UploadFile(localFilePath string, remotePath string) (int, error)
Click to show internal directories.
Click to hide internal directories.