Documentation
¶
Index ¶
- Variables
- type SSHCommand
- type SSHConnection
- func (a *SSHConnection) Forward(ctx context.Context, localPort int, remotePort int) error
- func (a *SSHConnection) ForwardKillAll(ctx context.Context) error
- func (a *SSHConnection) GetCmd(cmd string, args ...string) remote.Cmder
- func (a *SSHConnection) List(path string) ([]remote.FileInfo, error)
- func (a *SSHConnection) MkDirAll(path string) error
- func (a *SSHConnection) ReadFile(path string) (io.ReadCloser, error)
- func (a *SSHConnection) Remove(path string) error
- func (a *SSHConnection) Stats(p string) (remote.FileInfo, error)
- func (a *SSHConnection) WriteFile(r io.Reader, path string) error
- type WithCloser
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAuthFailed = errors.New("ssh authentication failed")
Functions ¶
This section is empty.
Types ¶
type SSHCommand ¶
type SSHCommand struct {
// contains filtered or unexported fields
}
func (*SSHCommand) Interactive ¶
func (c *SSHCommand) Interactive() (io.WriteCloser, io.Reader, io.Reader, remote.Closer, error)
type SSHConnection ¶
func FromHost ¶
func FromHost(user, password, address string) (*SSHConnection, error)
func (*SSHConnection) ForwardKillAll ¶
func (a *SSHConnection) ForwardKillAll(ctx context.Context) error
func (*SSHConnection) GetCmd ¶
func (a *SSHConnection) GetCmd(cmd string, args ...string) remote.Cmder
func (*SSHConnection) MkDirAll ¶
func (a *SSHConnection) MkDirAll(path string) error
func (*SSHConnection) ReadFile ¶
func (a *SSHConnection) ReadFile(path string) (io.ReadCloser, error)
func (*SSHConnection) Remove ¶
func (a *SSHConnection) Remove(path string) error
type WithCloser ¶
func (WithCloser) Close ¶
func (w WithCloser) Close() error
Click to show internal directories.
Click to hide internal directories.