sftp

package
v1.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseDelay = 5 * time.Second
)

Variables

View Source
var ErrNonRetryable = errors.New("non-retryable error")

Functions

This section is empty.

Types

type Result

type Result struct {
	OK      bool   `json:"ok"`
	Error   string `json:"error"`
	Written int64  `json:"written"`
}

type Sftp

type Sftp struct {
	MaxAttempts int    // by default it is 0, infinite retries
	Path        string `yaml:"path"`
	SshHost     string `yaml:"sshhost"`
	SshUser     string `yaml:"sshuser"`
	SshKey      string `yaml:"sshkey"`
	// contains filtered or unexported fields
}

func NewSftp

func NewSftp(config *SftpConifg) *Sftp

func (*Sftp) IsPathDir

func (sf *Sftp) IsPathDir(path string) (bool, error)

func (*Sftp) Save

func (sf *Sftp) Save(reader io.Reader, pathGenerator storage.PathGeneratorFunc) error

type SftpConifg

type SftpConifg struct {
	Host, User, Key string
	MaxAttempts     int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL