Documentation
¶
Index ¶
- func BatchDownload(cfg *iqshell.Config, info BatchDownloadInfo)
- func BatchDownloadWithConfig(cfg *iqshell.Config, info BatchDownloadWithConfigInfo)
- func DownloadFile(cfg *iqshell.Config, info DownloadInfo)
- func NewWorkProvider(bucket string, inputFile string, itemSeparate string) flow.WorkProvider
- type BatchDownloadInfo
- type BatchDownloadWithConfigInfo
- type DownloadCfg
- type DownloadInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchDownload ¶
func BatchDownload(cfg *iqshell.Config, info BatchDownloadInfo)
func BatchDownloadWithConfig ¶
func BatchDownloadWithConfig(cfg *iqshell.Config, info BatchDownloadWithConfigInfo)
func DownloadFile ¶
func DownloadFile(cfg *iqshell.Config, info DownloadInfo)
func NewWorkProvider ¶
func NewWorkProvider(bucket string, inputFile string, itemSeparate string) flow.WorkProvider
Types ¶
type BatchDownloadInfo ¶
type BatchDownloadInfo struct {
BatchInfo batch.Info
DownloadCfg
}
func (*BatchDownloadInfo) Check ¶
func (info *BatchDownloadInfo) Check() *data.CodeError
type BatchDownloadWithConfigInfo ¶
func (*BatchDownloadWithConfigInfo) Check ¶
func (info *BatchDownloadWithConfigInfo) Check() *data.CodeError
type DownloadCfg ¶
type DownloadCfg struct {
ThreadCount int `json:"thread_count,omitempty"`
FileEncoding string `json:"file_encoding,omitempty"`
KeyFile string `json:"key_file,omitempty"`
DestDir string `json:"dest_dir,omitempty"`
Bucket string `json:"bucket,omitempty"`
Prefix string `json:"prefix,omitempty"`
Suffixes string `json:"suffixes,omitempty"`
IoHost string `json:"io_host,omitempty"`
Public bool `json:"public,omitempty"`
CheckHash bool `json:"check_hash,omitempty"`
//down from cdn
Referer string `json:"referer,omitempty"`
CdnDomain string `json:"cdn_domain,omitempty"`
// 是否使用 getfile api,私有云使用
GetFileApi bool `json:"get_file_api"`
// 当遇到错误时删除临时文件
RemoveTempWhileError bool `json:"remove_temp_while_error"`
// 下载状态保存路径
RecordRoot string `json:"record_root,omitempty"`
}
func DefaultDownloadCfg ¶
func DefaultDownloadCfg() DownloadCfg
func (*DownloadCfg) Check ¶
func (d *DownloadCfg) Check() *data.CodeError
func (*DownloadCfg) JobId ¶
func (d *DownloadCfg) JobId() string
type DownloadInfo ¶
type DownloadInfo struct {
Bucket string // 文件被保存的 bucket
Key string // 文件被保存的 key
ToFile string // 文件保存的路径
UseGetFileApi bool //
IsPublic bool //
CheckHash bool // 是否检测文件 hash
Domain string // 下载的 domain
RemoveTempWhileError bool //
}
func (*DownloadInfo) Check ¶
func (info *DownloadInfo) Check() *data.CodeError
Click to show internal directories.
Click to hide internal directories.