Documentation ¶
Index ¶
- func GoConnect(ctx context.Context, sshParams params.SSHParams, terminal bool, ...) error
- func GoConnectAuth(ctx context.Context, sshParams params.SSHParams, terminal bool, ...) error
- func NativeConnect(ctx context.Context, sshParams params.SSHParams, terminal, verbose bool, ...) error
- func SFTPClient(gparams params.SSHParams, methods []ssh.AuthMethod, l *zap.SugaredLogger) (*sftp.Client, error)
- func SFTPGet(ctx context.Context, srcs []string, gparams params.SSHParams, ...) error
- func SFTPGetAuth(ctx context.Context, srcs []string, gparams params.SSHParams, ...) error
- func SFTPList(ctx context.Context, gparams params.SSHParams, ...) error
- func SFTPListAuth(ctx context.Context, gparams params.SSHParams, auth []ssh.AuthMethod, ...) error
- func SFTPPut(ctx context.Context, sources []Source, remotePath string, ...) error
- func SFTPPutAuth(ctx context.Context, sources []Source, remotePath string, ...) error
- func ScpGet(ctx context.Context, srcs []string, gparams params.SSHParams, ...) error
- func ScpGetAuth(ctx context.Context, srcs []string, gparams params.SSHParams, ...) error
- func ScpPut(ctx context.Context, sources []Source, remotePath string, ...) error
- func ScpPutAuth(ctx context.Context, sources []Source, remotePath string, ...) error
- type Callback
- type Source
- type UploadDirSource
- type UploadFileSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GoConnectAuth ¶ added in v0.3.1
func NativeConnect ¶ added in v0.3.1
func SFTPClient ¶ added in v0.3.1
func SFTPClient(gparams params.SSHParams, methods []ssh.AuthMethod, l *zap.SugaredLogger) (*sftp.Client, error)
func SFTPGetAuth ¶ added in v0.3.1
func SFTPList ¶ added in v0.3.1
func SFTPList(ctx context.Context, gparams params.SSHParams, privkey, cert *memguard.LockedBuffer, l *zap.SugaredLogger, cb remoteops.ListCallback) error
func SFTPListAuth ¶ added in v0.3.1
func SFTPListAuth(ctx context.Context, gparams params.SSHParams, auth []ssh.AuthMethod, l *zap.SugaredLogger, cb remoteops.ListCallback) error
func SFTPPutAuth ¶ added in v0.3.1
func ScpGetAuth ¶ added in v0.3.1
func ScpPutAuth ¶ added in v0.3.1
Types ¶
type Callback ¶ added in v0.3.0
type Callback func(isDir, endOfDir bool, name string, perms os.FileMode, mtime, atime time.Time, content io.Reader) error
Callback is a function type that is used by ScpGet to return the remote SSH directories and files.
type Source ¶ added in v0.3.0
type Source interface { IsSource() Close() error }
func MakeSource ¶ added in v0.3.0
TODO: support globs
type UploadDirSource ¶ added in v0.3.0
type UploadDirSource struct {
Path string
}
func (*UploadDirSource) Close ¶ added in v0.3.0
func (s *UploadDirSource) Close() error
func (*UploadDirSource) IsSource ¶ added in v0.3.0
func (s *UploadDirSource) IsSource()
type UploadFileSource ¶ added in v0.3.0
type UploadFileSource struct { Name string Reader io.Reader Size int64 Permissions os.FileMode CloseFunc func() error }
func (*UploadFileSource) Close ¶ added in v0.3.0
func (s *UploadFileSource) Close() error
func (*UploadFileSource) IsSource ¶ added in v0.3.0
func (s *UploadFileSource) IsSource()
Click to show internal directories.
Click to hide internal directories.