sftp

package
v0.0.0-...-3cef9f2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, u *url.URL) (backends.Backend, error)

New returns an SFTP backend mounted at the provided path.

Types

type SFTP

type SFTP struct {
	// contains filtered or unexported fields
}

SFTP implements the Backend interface using SFTP

func (*SFTP) Close

func (fs *SFTP) Close() error

func (*SFTP) Delete

func (fs *SFTP) Delete(ctx context.Context, path string) error

Delete implements the Backend interface

func (*SFTP) Get

func (fs *SFTP) Get(ctx context.Context, path string, offset, length int64) (rv io.ReadCloser, err error)

Get implements the Backend interface

func (*SFTP) List

func (fs *SFTP) List(ctx context.Context, prefix string,
	cb func(ctx context.Context, path string) error) error

List implements the Backend interface

func (*SFTP) Put

func (fs *SFTP) Put(ctx context.Context, path string, data io.Reader) (err error)

Put implements the Backend interface

Jump to

Keyboard shortcuts

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