sftpi

package
v0.0.0-...-95d3f28 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2025 License: GPL-2.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 SFTP

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

func New

func New(name string, cfg map[string]string) SFTP

func (SFTP) Download

func (s SFTP) Download(name string, filename string) (string, error)

func (SFTP) Get

func (s SFTP) Get(filename string) ([]byte, error)

Get returns a file (if exist) from the storage target

func (SFTP) Name

func (s SFTP) Name() string

func (SFTP) Put

func (s SFTP) Put(filename string, data []byte) error

Put saves a file to the storage target

func (SFTP) Upload

func (s SFTP) Upload(filename string, name string) error

Jump to

Keyboard shortcuts

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