sftpmanager

package
v4.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: AGPL-3.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConnector added in v4.1.3

func DefaultConnector(c *Config) (*sftp.Client, error)

func New

func New(connector Connector, config *Config, editableMaxSize int, ctx echo.Context) *sftpManager
func Search(client *sftp.Client, query string, typ string, nums ...int) []string

Types

type Config added in v4.1.3

type Config struct {
	Host       string `db:"host" bson:"host" comment:"主机名" json:"host" xml:"host"`
	Port       int    `db:"port" bson:"port" comment:"端口" json:"port" xml:"port"`
	Username   string `db:"username" bson:"username" comment:"用户名" json:"username" xml:"username"`
	Password   string `db:"password" bson:"password" comment:"密码" json:"password" xml:"password"`
	PrivateKey string `db:"private_key" bson:"private_key" comment:"私钥内容" json:"private_key" xml:"private_key"`
	Passphrase string `db:"passphrase" bson:"passphrase" comment:"私钥口令" json:"passphrase" xml:"passphrase"`
}

Config 配置

func (*Config) Connect added in v4.1.3

func (c *Config) Connect() (*sftp.Client, error)

type Connector added in v4.1.3

type Connector func(*Config) (*sftp.Client, error)

Jump to

Keyboard shortcuts

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