Documentation
¶
Index ¶
- func Exist(ftpClient *ftp.ServerConn, sPath string) (bool, error)
- func Mkdir(ftpClient *ftp.ServerConn, sPath string) error
- func SetPath(ftpClient *ftp.ServerConn, sPath string) (string, error)
- type Config
- func (this *Config) Close()
- 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) Login() 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"` // ftp地址:端口
User string `json:"user" yaml:"user" ini:"user"`
Pwd string `json:"pwd" yaml:"pwd" ini:"pwd"` // 密码
// 这部分是ftp的
Epsv int `ini:"epsv" yaml:"epsv" json:"epsv,omitempty" gorm:"type:int;not null;default:0;comment:连接模式"` // ftp 连接模式,0 被动模式 1 主动模式
// contains filtered or unexported fields
}
Config ftp 配置
func (Config) GormDBDataType ¶
func (Config) GormDataType ¶
func (*Config) RemovePasswd ¶
func (this *Config) RemovePasswd()
Click to show internal directories.
Click to hide internal directories.