sftp

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addition

type Addition struct {
	Address    string `json:"address" required:"true"`
	Username   string `json:"username" required:"true"`
	PrivateKey string `json:"private_key" type:"text"`
	Password   string `json:"password"`
	Passphrase string `json:"passphrase"`
	driver.RootPath
	IgnoreSymlinkError bool `json:"ignore_symlink_error" default:"false" info:"Ignore symlink error"`
}

type SFTP

type SFTP struct {
	model.Storage
	Addition
	// contains filtered or unexported fields
}

func (*SFTP) Config

func (d *SFTP) Config() driver.Config

func (*SFTP) Copy

func (d *SFTP) Copy(ctx context.Context, srcObj, dstDir model.Obj) error

func (*SFTP) Drop

func (d *SFTP) Drop(ctx context.Context) error

func (*SFTP) GetAddition

func (d *SFTP) GetAddition() driver.Additional

func (*SFTP) Init

func (d *SFTP) Init(ctx context.Context) error
func (d *SFTP) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)

func (*SFTP) List

func (d *SFTP) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)

func (*SFTP) MakeDir

func (d *SFTP) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error

func (*SFTP) Move

func (d *SFTP) Move(ctx context.Context, srcObj, dstDir model.Obj) error

func (*SFTP) Put

func (d *SFTP) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) error

func (*SFTP) Remove

func (d *SFTP) Remove(ctx context.Context, obj model.Obj) error

func (*SFTP) Rename

func (d *SFTP) Rename(ctx context.Context, srcObj model.Obj, newName string) error

Jump to

Keyboard shortcuts

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