Documentation
¶
Index ¶
- func New(opt *Option) (driver.FS, error)
- type Option
- type SFTP
- func (d *SFTP) Close() error
- func (d *SFTP) Copy(ctx context.Context, src, dst string) error
- func (d *SFTP) Create(path string) (driver.FileWriter, error)
- func (d *SFTP) Get(ctx context.Context, path string) (driver.File, error)
- func (d *SFTP) List(ctx context.Context, path string, metas ...driver.Meta) ([]driver.File, error)
- func (d *SFTP) MakeDir(ctx context.Context, path string) error
- func (d *SFTP) Move(ctx context.Context, src, dst string) error
- func (d *SFTP) Open(path string) (driver.FileReader, error)
- func (d *SFTP) Remove(ctx context.Context, path string) error
- func (d *SFTP) Rename(ctx context.Context, path, newName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option struct {
base.Option
Host string `json:"host" validate:"required"`
Port int `json:"port"`
Username string `json:"username" validate:"required"`
Password string `json:"password" validate:"required_without=PrivateKey"`
PrivateKey string `json:"private_key" validate:"required_without=Password"`
}
Click to show internal directories.
Click to hide internal directories.