Documentation
¶
Index ¶
- type Saver
- func (this *Saver) Close()
- func (this *Saver) Delete(p string) error
- func (this *Saver) DeleteAll(p string) error
- func (this *Saver) ListFiles(dirPath string) ([]string, error)
- func (this *Saver) Read(p string) (io.ReadCloser, error)
- func (this *Saver) Write(p string, src io.Reader, existIgnores ...bool) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Saver ¶
type Saver struct {
StorageType string `json:"storage_type" yaml:"storage_type" ini:"storage_type"` // 存储类型 local、sftp、ftp、hdfs、miniio等
// 本地文件系统:/开头,最终路径为/root/path,如果没有/,最终路径是current_path/root/path
// ftp、sftp:最终生成路径是/userHome/root/path
Root string `json:"root" yaml:"root" ini:"root"`
local.Local `json:"local" yaml:"local" ini:"local"` // 本地文件系统
SftpConfig sftp.Config `json:"sftp_config" yaml:"sftp_config" ini:"sftp_config"` // sftp客户端配置
FtpConfig ftp.Config `json:"ftp_config" yaml:"ftp_config" ini:"ftp_config"` // ftp客户端配置
HdfsConfig hdfs.Config `json:"hdfs_config" yaml:"hdfs_config" ini:"hdfs_config"` // hdfs客户端配置
MinioConfig minio.Config `json:"minio_config" yaml:"minio_config" ini:"minio_config"` // minio客户端配置
MinioOptions minio.Options `json:"minio_options" yaml:"minio_options" ini:"minio_options"` // minio客户端配置
}
Click to show internal directories.
Click to hide internal directories.