sftp

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authentication

type Authentication string
const (
	Password  Authentication = "password"
	PublicKey Authentication = "public_key"
)

type Config

type Config struct {
	Host           string         `json:"host" yaml:"host" ini:"host"`
	User           string         `json:"user" yaml:"user" ini:"user"`
	Pwd            string         `json:"pwd" yaml:"pwd" ini:"pwd"`
	Authentication Authentication `json:"authentication" yaml:"authentication" ini:"authentication"`
}

func (Config) GormDBDataType

func (Config) GormDBDataType(db *gorm.DB, field *schema.Field) string

func (Config) GormDataType

func (c Config) GormDataType() string

func (*Config) RemovePasswd

func (c *Config) RemovePasswd()

noinspection all

func (*Config) Scan

func (c *Config) Scan(val interface{}) error

noinspection all

func (*Config) SetInfo

func (c *Config) SetInfo(args ...any)

noinspection all

func (*Config) Valid

func (c *Config) Valid() error

noinspection all

func (Config) Value

func (c Config) Value() (driver.Value, error)

noinspection all

type Saver

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

func New

func New(cfg *Config) (*Saver, error)

func (*Saver) Close

func (s *Saver) Close() error

func (*Saver) Delete

func (s *Saver) Delete(p string) error

func (*Saver) DeleteAll

func (s *Saver) DeleteAll(p string) error

func (*Saver) ListFiles

func (s *Saver) ListFiles(dirPath string) ([]string, error)

func (*Saver) Read

func (s *Saver) Read(p string) (io.ReadCloser, error)

func (*Saver) Write

func (s *Saver) Write(p string, src io.Reader, existIgnores ...bool) (int64, error)

Jump to

Keyboard shortcuts

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