Versions in this module Expand all Collapse all v1 v1.1.0 Nov 4, 2026 Changes in this version + const DefaultKeepAliveInterval + const DefaultKeepAliveMaxMissed + const DefaultSSHPort + const DefaultSSHTimeout + var ErrDecryptIntegrity = errors.New(...) + var ErrDownloadTooLarge = errors.New("remote file exceeds DownloadOptions.MaxSize") + var ErrNotEncrypted = errors.New(...) + var ErrRemoteNotConfigured = errors.New("remote not configured: set Host in Opts") + func DownloadWithOptions(opts *Opts, pattern, destDir, remoteDir, aesPassword string, ...) ([]string, error) + func ValidRemoteFileName(name string) bool + type DownloadOptions struct + AllowLegacyDecryption bool + MaxSize int64 type Opts + KeepAliveInterval time.Duration + KeepAliveMaxMissed int + KeyPassphrase string + Timeout time.Duration v0 v0.2.4 Jun 23, 2026 Changes in this version + const EncryptionOverhead + var BuildTime = "2026-06-24 00:44:59" + var Version = "0.2.4.2" + func AppendKnownHostsLine(knownHostsPath, hostToken, keyLine string, log Logger) error + func AppendServerHostKey(opts *Opts, knownHostsPath string, log Logger) (written bool, err error) + func Delete(opts *Opts, remoteDir string, names []string, log Logger) error + func DialKnownHosts(opts *Opts, kh KnownHostsOptions, log Logger) (*ssh.Client, error) + func DialWithHostKeyCallback(opts *Opts, hostKeyCallback ssh.HostKeyCallback, log Logger) (*ssh.Client, error) + func Download(opts *Opts, pattern, destDir, remoteDir, aesPassword string, log Logger) ([]string, error) + func FetchServerHostKey(opts *Opts) (keyLine string, err error) + func FormatKnownHostsHostToken(host string, port int) string + func HostKeyAlreadyPresent(currentValue, newKeyLine string) (bool, error) + func MkdirAllRemote(client *ssh.Client, remotePath string, log Logger) error + func NewSFTPClient(opts *Opts, log Logger) (*sftp.Client, *ssh.Client, error) + func Sync(opts *Opts, localFiles []LocalFile, remoteDir, aesPassword string, log Logger) error + func UploadFileIfNewer(client *ssh.Client, localPath, remotePath string, log Logger) error + func ValidDownloadPattern(pattern string) bool + type KnownHostsOptions struct + FetchHostKey bool + Path string + TrustOnMismatch bool + type LocalFile struct + ModTime time.Time + Name string + Path string + Size int64 + type Logger interface + Info func(string, ...interface{}) + Warn func(string, ...interface{}) + type Opts struct + Host string + HostKey string + KeyFile string + Password string + Port int + User string + type RemoteEntry struct + ModTime time.Time + Name string + Size int64 + func List(opts *Opts, remoteDir string, log Logger) ([]RemoteEntry, error)