Documentation
¶
Index ¶
- func Exist(sftpClient *sftp.Client, sPath string) (bool, error)
- func Mkdir(sftpClient *sftp.Client, sPath string) error
- func SetPath(sftpClient *sftp.Client, sPath string) (string, error)
- type Config
- func (this *Config) Close()
- func (this *Config) CloseSftp()
- func (this *Config) CloseSsh()
- func (this *Config) Delete(p string) error
- func (this *Config) DeleteAll(p string) error
- func (Config) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (this Config) GormDataType() string
- func (this *Config) ListFiles(dirPath string) ([]string, error)
- func (this *Config) LoginSftp() error
- func (this *Config) LoginSsh() error
- func (this *Config) Read(p string) (io.ReadCloser, error)
- func (this *Config) RemovePasswd()
- func (this *Config) Scan(val interface{}) error
- func (this *Config) SetInfo(args ...any)
- func (this *Config) Valid() error
- func (this Config) Value() (driver.Value, error)
- func (this *Config) Write(p string, src io.Reader, existIgnores ...bool) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
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 string `json:"authentication" yaml:"authentication" ini:"authentication"` // 认证方式 ,默认passwd,可选public_key
// contains filtered or unexported fields
}
Config sftp 配置
func (Config) GormDBDataType ¶
func (Config) GormDataType ¶
func (*Config) RemovePasswd ¶
func (this *Config) RemovePasswd()
Click to show internal directories.
Click to hide internal directories.