Documentation ¶
Index ¶
- Constants
- Variables
- func AddCredentail(c Credential) error
- func CleanCache() error
- func CopyFile(path, toPath string) error
- func CopyFiles(paths []string, toDir string) error
- func CreateAccessTokenByDeviceCode() error
- func DeleteFile(path string) error
- func DeleteFiles(paths []string) error
- func DeleteSyncModel(id string) error
- func Do2HTTPRequest(url string, body io.Reader, headers map[string]string) (string, int, error)
- func Do2HTTPRequestToBytes(url string, body io.Reader, headers map[string]string) ([]byte, int, error)
- func GetClient() *sdk.APIClient
- func GetDefaultDownloadDir() string
- func GetFileBytes(fsid uint64) ([]byte, error)
- func GetFileDLink(fsid uint64) (string, error)
- func GetKey() ([]byte, error)
- func GetLogger() *logrus.Logger
- func GetSyncModels() (m map[string]*SyncModel)
- func GetUriBytes(uri string, rangeStart, rangeEnd int) ([]byte, error)
- func IsLoggerDebug() bool
- func JoinCache(elem ...string) string
- func JoinDownload(elem ...string) string
- func JoinStoage(elem ...string) string
- func LogInfoString(w io.Writer, s string)
- func MoveFile(path, toPath string) error
- func MoveFiles(paths []string, toDir string) error
- func NewFileSortSlice(files []*FileInfoDto) fileSortSlice
- func NewRespError(r *http.Response) error
- func PanInfo() (*openapi.Quotaresponse, error)
- func PrintFileInfoList(files []*FileInfoDto)
- func PrintSyncModelList()
- func PromptConfirm(confirm string) bool
- func PromptSelect(label string, actions []*SelectItem, hasSearch bool, limit int, ...) (err error)
- func RefreshAccessToken() error
- func SaveModels(m map[string]*SyncModel) error
- func ScheRefreshAccessToken() error
- func SetLogLevel(level logrus.Level)
- func SetOutputFile()
- func SplitFile(path, tmpdir string, fragmentSize int64) ([]string, error)
- func TaskUploadDir(from, to string, isSync bool, isRecursion bool, isIncludeHide bool) error
- func WalkDir(dir string, isRecursion bool, fn func(file *FileInfoDto) error) error
- type AccessToken
- type Config
- type Credential
- type DownloadTaskInfo
- type DownloadTasker
- type Downloader
- type ErrorResponse
- type FileInfoDto
- func GetDirAllFiles(dir string) ([]*FileInfoDto, error)
- func GetFileByFSID(fsid uint64) (*FileInfoDto, error)
- func GetFileByPath(path string) (*FileInfoDto, error)
- func GetFilesByFSIDS(fsids []uint64) ([]*FileInfoDto, error)
- func SearchFiles(dir, key string) ([]*FileInfoDto, error)
- func UploadFile(fromPath, toPath string) (*FileInfoDto, error)
- func (f FileInfoDto) BuildPretty() []pretty.Field
- func (f FileInfoDto) GetCategory() string
- func (f FileInfoDto) GetFileType() string
- func (f FileInfoDto) GetFileTypeEmoji() string
- func (f FileInfoDto) GetFileTypeIcon() string
- func (f FileInfoDto) GetFilename() string
- func (f FileInfoDto) GetLocalCTime() string
- func (f FileInfoDto) GetLocalMTime() string
- func (f FileInfoDto) GetPretty() string
- func (f FileInfoDto) GetServerCTime() string
- func (f FileInfoDto) GetServerMTime() string
- func (f FileInfoDto) GetSize() string
- func (f FileInfoDto) IsDir() bool
- func (f FileInfoDto) PrettyPrint()
- type FileInfoRequest
- type FileListAllRequest
- func (f FileListAllRequest) Desc(r int32) FileListAllRequest
- func (r FileListAllRequest) Execute() (*FileListAllResponse, error)
- func (r FileListAllRequest) GetWeb() string
- func (f FileListAllRequest) Limit(r int32) FileListAllRequest
- func (f FileListAllRequest) Order(order string) FileListAllRequest
- func (f FileListAllRequest) Path(path string) FileListAllRequest
- func (f FileListAllRequest) Recursion(r int32) FileListAllRequest
- func (f FileListAllRequest) Start(r int32) FileListAllRequest
- func (r FileListAllRequest) Web(web int) FileListAllRequest
- type FileListAllResponse
- type FileListRequest
- func (r FileListRequest) Desc(d int32) FileListRequest
- func (r FileListRequest) Dir(dir string) FileListRequest
- func (r FileListRequest) Execute() (*FileListResponse, error)
- func (r FileListRequest) GetStart() string
- func (r FileListRequest) GetWeb() string
- func (r FileListRequest) Limit(l int32) FileListRequest
- func (r FileListRequest) Order(s string) FileListRequest
- func (r FileListRequest) Page(page int) FileListRequest
- func (r FileListRequest) Web(web int) FileListRequest
- type FileListResponse
- type FileManageOpera
- type FileManagerFile
- type FileManagerInfo
- type FileManagerRequest
- type FileManagerResponse
- type FileSearchRequest
- type IResponse
- type Icon
- type LogFormatter
- type Response
- type SelectAction
- type SelectFunc
- type SelectItem
- type SyncMode
- type SyncModel
- func (s *SyncModel) Backup() error
- func (s SyncModel) BuildPretty() []pretty.Field
- func (s SyncModel) Desc() string
- func (s *SyncModel) Exec() error
- func (s SyncModel) GetCreateTime() string
- func (s SyncModel) GetLastSyncTime() string
- func (s SyncModel) GetMode() string
- func (s SyncModel) IsBackup() bool
- type SyncModelSlice
- type UFTaskInfo
- type UploadFileRequest
- func (r UploadFileRequest) Execute() (*UploadFileResponse, error)
- func (r UploadFileRequest) FromPath(path string) UploadFileRequest
- func (r UploadFileRequest) GetPartseq() string
- func (r *UploadFileRequest) IsSync(s bool) *UploadFileRequest
- func (r *UploadFileRequest) RType(t int32) *UploadFileRequest
- func (r UploadFileRequest) ToPath(path string) UploadFileRequest
- func (r UploadFileRequest) Type(typ string) UploadFileRequest
- type UploadFileResponse
- type UploadFragmentTasker
- type UploadTaskInfo
- type UploadTasker
- func (m *UploadTasker) AfterRun() error
- func (u *UploadTasker) BeforeRun() error
- func (m *UploadTasker) BuildTasks() error
- func (u *UploadTasker) Exec() error
- func (u *UploadTasker) GetExistFileMap() (map[string]FileInfoDto, error)
- func (m UploadTasker) RunTask(task *tasker.Task) error
- func (u *UploadTasker) SetRegexp(pattern string) *UploadTasker
- type UserInfoDto
Constants ¶
View Source
const ( DefaultUploadDir = "/apps/bdpan/" EnvDownloadDir = "BDPAN_DOWNLOAD_DIR" )
View Source
const ( OndupFail string = "fail" OndupNewCopy = "newcopy" OndupOverwrite = "overwrite" OndupSkip = "skip" AsyncSync int32 = iota AsyncSelfAdaptation AsyncAsync OperaMove FileManageOpera = iota OperaCopy OperaDelete )
View Source
const ( // FRAGMENT_MAX_SIZE int64 = 4 * 1024 * 1024 FRAGMENT_MAX_SIZE int64 = 4 * (1 << 20) // 4 M )
Variables ¶
View Source
var (
// 当前目录
PwdDir, _ = os.Getwd()
// 默认下载目录
DefaultDownloadDir, _ = homedir.Expand("~/Downloads")
)
View Source
var ErrAccessFail error = errors.New("身份验证失败")
View Source
var ErrAccessTokenFail error = errors.New("access token 失效")
View Source
var ErrApiFrequent error = errors.New("接口请求过于频繁,注意控制")
View Source
var ErrParamError error = errors.New("参数错误")
View Source
var ErrPathExists error = errors.New("文件已存在")
View Source
var ErrPathNotFound error = errors.New("文件或目录不存在")
View Source
var ErrUserNoUse error = errors.New("不允许接入用户数据")
View Source
var (
Log *logrus.Logger
)
Functions ¶
func AddCredentail ¶
func AddCredentail(c Credential) error
func CleanCache ¶
func CleanCache() error
func CreateAccessTokenByDeviceCode ¶
func CreateAccessTokenByDeviceCode() error
func DeleteFile ¶
func DeleteFiles ¶ added in v0.5.0
func DeleteSyncModel ¶
func Do2HTTPRequest ¶
func Do2HTTPRequestToBytes ¶
func GetDefaultDownloadDir ¶
func GetDefaultDownloadDir() string
func GetFileBytes ¶ added in v0.3.2
func GetFileDLink ¶
func IsLoggerDebug ¶
func IsLoggerDebug() bool
func JoinDownload ¶
func JoinStoage ¶
func LogInfoString ¶
func NewFileSortSlice ¶ added in v0.5.0
func NewFileSortSlice(files []*FileInfoDto) fileSortSlice
func NewRespError ¶
func PanInfo ¶
func PanInfo() (*openapi.Quotaresponse, error)
func PrintFileInfoList ¶
func PrintFileInfoList(files []*FileInfoDto)
func PrintSyncModelList ¶
func PrintSyncModelList()
func PromptConfirm ¶
func PromptSelect ¶
func PromptSelect( label string, actions []*SelectItem, hasSearch bool, limit int, selectFunc SelectFunc, ) (err error)
func RefreshAccessToken ¶
func RefreshAccessToken() error
func SaveModels ¶
func ScheRefreshAccessToken ¶
func ScheRefreshAccessToken() error
func SetLogLevel ¶
func TaskUploadDir ¶
Types ¶
type AccessToken ¶
type AccessToken struct { ExpiresIn int32 `json:"expires_in,omitempty"` AccessToken string `json:"access_token,omitempty"` RefreshToken string `json:"refresh_token,omitempty"` RefreshTimestamp int64 `json:"refresh_timestamp,omitempty"` }
func GetConfigAccessToken ¶
func GetConfigAccessToken() (*AccessToken, error)
func (AccessToken) Print ¶
func (t AccessToken) Print()
type Credential ¶
type Credential struct { AppId string `json:"app_id,omitempty"` AppKey string `json:"app_key,omitempty"` SecretKey string `json:"secret_key,omitempty"` SignKey string `json:"sign_key,omitempty"` // contains filtered or unexported fields }
func GetConfigCredentail ¶
func GetConfigCredentail() (*Credential, error)
func GetCredentail ¶
func GetCredentail(appId string) (*Credential, error)
func GetCredentails ¶
func GetCredentails() ([]*Credential, error)
func (*Credential) GetAccessToken ¶
func (c *Credential) GetAccessToken() (*AccessToken, error)
type DownloadTaskInfo ¶
type DownloadTaskInfo struct { From string FromFile *FileInfoDto To string }
type DownloadTasker ¶
type DownloadTasker struct { *tasker.Tasker // 迁移的地址 From string FromFile *FileInfoDto Froms []string // To string Path string Dir string IsSync bool // 是否同步执行 IsRecursion bool // contains filtered or unexported fields }
func NewDownloadTasker ¶
func NewDownloadTasker(file *FileInfoDto) *DownloadTasker
func (*DownloadTasker) AfterRun ¶
func (m *DownloadTasker) AfterRun() error
func (*DownloadTasker) BeforeRun ¶
func (m *DownloadTasker) BeforeRun() error
func (*DownloadTasker) Build ¶
func (m *DownloadTasker) Build() error
func (*DownloadTasker) BuildTasks ¶
func (d *DownloadTasker) BuildTasks() error
func (*DownloadTasker) Exec ¶
func (m *DownloadTasker) Exec() error
func (DownloadTasker) RunTask ¶
func (d DownloadTasker) RunTask(task *tasker.Task) error
type Downloader ¶
type Downloader struct { Path string Dir string Out io.Writer IsNotCover bool DisableLog bool UseProgressBar bool // contains filtered or unexported fields }
func NewDownloader ¶
func NewDownloader() *Downloader
func (*Downloader) DownloadFile ¶
func (d *Downloader) DownloadFile(file *FileInfoDto) error
func (*Downloader) DownloadFileWithPath ¶
func (d *Downloader) DownloadFileWithPath(file *FileInfoDto, path string) error
func (*Downloader) EnableVerbose ¶
func (d *Downloader) EnableVerbose() *Downloader
func (*Downloader) Exec ¶
func (d *Downloader) Exec() error
func (*Downloader) SetPath ¶
func (d *Downloader) SetPath(path string) *Downloader
type ErrorResponse ¶
type ErrorResponse struct { Errno int32 `json:"errno,omitempty"` Erro string `json:"error"` ErrorDescription string `json:"error_description"` ErrorCode int `json:"error_code"` ErrorMsg string `json:"error_msg"` // contains filtered or unexported fields }
func NewErrorResponse ¶
func NewErrorResponse(r *http.Response) *ErrorResponse
func (ErrorResponse) Err ¶
func (e ErrorResponse) Err() error
func (ErrorResponse) Error ¶
func (e ErrorResponse) Error() string
func (ErrorResponse) IsError ¶
func (e ErrorResponse) IsError() bool
func (ErrorResponse) Print ¶
func (e ErrorResponse) Print()
type FileInfoDto ¶
type FileInfoDto struct { FSID uint64 `json:"fs_id"` Path string `json:"path"` Size int `json:"size"` FileType int `json:"isdir"` Filename string `json:"filename"` ServerFilename string `json:"server_filename"` Category int `json:"category"` Dlink string `json:"dlink"` MD5 string `json:"md5"` Thumbs map[string]string `json:"thumbs"` ServerCTime int64 `json:"server_ctime"` ServerMTime int64 `json:"server_mtime"` LocalCTime int64 `json:"local_ctime"` LocalMTime int64 `json:"local_mtime"` }
func GetDirAllFiles ¶
func GetDirAllFiles(dir string) ([]*FileInfoDto, error)
func GetFileByFSID ¶
func GetFileByFSID(fsid uint64) (*FileInfoDto, error)
func GetFileByPath ¶
func GetFileByPath(path string) (*FileInfoDto, error)
func GetFilesByFSIDS ¶
func GetFilesByFSIDS(fsids []uint64) ([]*FileInfoDto, error)
func SearchFiles ¶
func SearchFiles(dir, key string) ([]*FileInfoDto, error)
TODO: 暂时用遍历的方式查找文件,后期需要改为搜索
func UploadFile ¶
func UploadFile(fromPath, toPath string) (*FileInfoDto, error)
func (FileInfoDto) BuildPretty ¶
func (f FileInfoDto) BuildPretty() []pretty.Field
func (FileInfoDto) GetCategory ¶
func (f FileInfoDto) GetCategory() string
func (FileInfoDto) GetFileType ¶
func (f FileInfoDto) GetFileType() string
func (FileInfoDto) GetFileTypeEmoji ¶
func (f FileInfoDto) GetFileTypeEmoji() string
func (FileInfoDto) GetFileTypeIcon ¶
func (f FileInfoDto) GetFileTypeIcon() string
func (FileInfoDto) GetFilename ¶
func (f FileInfoDto) GetFilename() string
func (FileInfoDto) GetLocalCTime ¶
func (f FileInfoDto) GetLocalCTime() string
func (FileInfoDto) GetLocalMTime ¶
func (f FileInfoDto) GetLocalMTime() string
func (FileInfoDto) GetPretty ¶
func (f FileInfoDto) GetPretty() string
func (FileInfoDto) GetServerCTime ¶
func (f FileInfoDto) GetServerCTime() string
func (FileInfoDto) GetServerMTime ¶
func (f FileInfoDto) GetServerMTime() string
func (FileInfoDto) GetSize ¶
func (f FileInfoDto) GetSize() string
func (FileInfoDto) IsDir ¶
func (f FileInfoDto) IsDir() bool
func (FileInfoDto) PrettyPrint ¶
func (f FileInfoDto) PrettyPrint()
type FileInfoRequest ¶
type FileInfoRequest struct {
// contains filtered or unexported fields
}
func NewFileInfoRequest ¶
func NewFileInfoRequest(fsids []uint64) FileInfoRequest
func (FileInfoRequest) Execute ¶
func (r FileInfoRequest) Execute() (*FileListResponse, error)
func (FileInfoRequest) FSID ¶
func (r FileInfoRequest) FSID(fsid uint64) FileInfoRequest
func (FileInfoRequest) FSIDs ¶
func (r FileInfoRequest) FSIDs(fsids []uint64) FileInfoRequest
func (FileInfoRequest) GetDlink ¶
func (r FileInfoRequest) GetDlink() string
func (FileInfoRequest) GetFSID ¶
func (r FileInfoRequest) GetFSID() string
type FileListAllRequest ¶
type FileListAllRequest struct {
// contains filtered or unexported fields
}
func NewFileListAllRequest ¶
func NewFileListAllRequest(path string) FileListAllRequest
func (FileListAllRequest) Desc ¶
func (f FileListAllRequest) Desc(r int32) FileListAllRequest
func (FileListAllRequest) Execute ¶
func (r FileListAllRequest) Execute() (*FileListAllResponse, error)
func (FileListAllRequest) GetWeb ¶
func (r FileListAllRequest) GetWeb() string
func (FileListAllRequest) Limit ¶
func (f FileListAllRequest) Limit(r int32) FileListAllRequest
func (FileListAllRequest) Order ¶
func (f FileListAllRequest) Order(order string) FileListAllRequest
func (FileListAllRequest) Path ¶
func (f FileListAllRequest) Path(path string) FileListAllRequest
func (FileListAllRequest) Recursion ¶
func (f FileListAllRequest) Recursion(r int32) FileListAllRequest
func (FileListAllRequest) Start ¶
func (f FileListAllRequest) Start(r int32) FileListAllRequest
func (FileListAllRequest) Web ¶
func (r FileListAllRequest) Web(web int) FileListAllRequest
type FileListAllResponse ¶
type FileListAllResponse struct { Errno int32 `json:"errno"` Errmsg string `json:"errmsg"` HasMore int `json:"has_more"` Cursor int `json:"cursor"` List []*FileInfoDto `json:"list"` }
type FileListRequest ¶
type FileListRequest struct {
// contains filtered or unexported fields
}
func NewFileListRequest ¶
func NewFileListRequest() FileListRequest
func (FileListRequest) Desc ¶
func (r FileListRequest) Desc(d int32) FileListRequest
func (FileListRequest) Dir ¶
func (r FileListRequest) Dir(dir string) FileListRequest
func (FileListRequest) Execute ¶
func (r FileListRequest) Execute() (*FileListResponse, error)
func (FileListRequest) GetStart ¶
func (r FileListRequest) GetStart() string
func (FileListRequest) GetWeb ¶
func (r FileListRequest) GetWeb() string
func (FileListRequest) Limit ¶
func (r FileListRequest) Limit(l int32) FileListRequest
func (FileListRequest) Order ¶
func (r FileListRequest) Order(s string) FileListRequest
func (FileListRequest) Page ¶
func (r FileListRequest) Page(page int) FileListRequest
func (FileListRequest) Web ¶
func (r FileListRequest) Web(web int) FileListRequest
type FileListResponse ¶
type FileListResponse struct { Response GuidInfo string `json:"guid_info"` Errmsg string `json:"errmsg"` List []*FileInfoDto `json:"list"` }
func NewFileListResponse ¶
func NewFileListResponse(r *http.Response) (*FileListResponse, error)
func (FileListResponse) Print ¶
func (f FileListResponse) Print()
type FileManageOpera ¶
type FileManageOpera int
type FileManagerFile ¶
type FileManagerFile struct { Path string `json:"path,omitempty"` Newname string `json:"newname,omitempty"` Dest string `json:"dest,omitempty"` Ondup string `json:"ondup,omitempty"` }
func NewFileManagerFile ¶
func NewFileManagerFile(path, dest, newname, ondup string) *FileManagerFile
type FileManagerInfo ¶
type FileManagerInfo struct { ErrorResponse Path string `json:"path,omitempty"` }
type FileManagerRequest ¶
type FileManagerRequest struct { Filelist []*FileManagerFile // 0 同步,1 自适应,2 异步 Async int32 // 全局ondup,遇到重复文件的处理策略, // fail(默认,直接返回失败)、newcopy(重命名文件)、overwrite、skip Ondup string // 文件操作参数,可实现文件复制、移动、重命名、删除,依次对应的参数值为:copy、move、rename、delete Opera FileManageOpera }
func NewFileManagerRequest ¶
func NewFileManagerRequest(opera FileManageOpera, filelist []*FileManagerFile) *FileManagerRequest
func (FileManagerRequest) Execute ¶
func (fm FileManagerRequest) Execute() (*FileManagerResponse, error)
func (FileManagerRequest) GetFilelistString ¶
func (fm FileManagerRequest) GetFilelistString() string
func (*FileManagerRequest) SetOndup ¶
func (f *FileManagerRequest) SetOndup(ondup string) *FileManagerRequest
type FileManagerResponse ¶
type FileManagerResponse struct { Response Info []FileManagerInfo `json:"info,omitempty"` RequestId int64 `json:"request_id,omitempty"` Taskid int64 `json:"taskid,omitempty"` }
type FileSearchRequest ¶
type FileSearchRequest struct {
// contains filtered or unexported fields
}
func NewFileSearchRequest ¶
func NewFileSearchRequest(key string) FileSearchRequest
func (FileSearchRequest) Dir ¶
func (r FileSearchRequest) Dir(dir string) FileSearchRequest
func (FileSearchRequest) Execute ¶
func (r FileSearchRequest) Execute() (*FileListResponse, error)
func (FileSearchRequest) GetRecursion ¶
func (f FileSearchRequest) GetRecursion() string
func (FileSearchRequest) Recursion ¶
func (f FileSearchRequest) Recursion(r int) FileSearchRequest
type Icon ¶
type Icon struct { Name string `json:"name"` Icon string `json:"icon"` Color string `json:"color"` }
func GetDefaultFileIcon ¶
func GetDefaultFileIcon() Icon
func GetIconByExt ¶
func GetIconByPath ¶
type LogFormatter ¶
type LogFormatter struct {
*logrus.TextFormatter
}
type Response ¶
type Response struct {
ErrorResponse
}
type SelectAction ¶
type SelectAction int
const ( ActionSystem SelectAction = iota + 100 ActionDelete ActionBack )
type SelectFunc ¶
type SelectItem ¶
type SelectItem struct { Name string Icon string Action SelectAction Desc string Info interface{} }
type SyncModel ¶
type SyncModel struct { ID string Remote string Local string Hash string Mode SyncMode HasHide bool CreateTime time.Time LastSyncTime time.Time }
func GetSyncModelsByRemote ¶ added in v0.5.0
获取存在的同步模型集合
func MustGetSyncModel ¶ added in v0.5.0
func NewSyncModel ¶
func (SyncModel) BuildPretty ¶
func (s SyncModel) BuildPretty() []pretty.Field
func (SyncModel) GetCreateTime ¶
func (SyncModel) GetLastSyncTime ¶
type SyncModelSlice ¶
type SyncModelSlice []*SyncModel
func (SyncModelSlice) GetWriter ¶
func (s SyncModelSlice) GetWriter() io.Writer
func (SyncModelSlice) Len ¶
func (s SyncModelSlice) Len() int
func (SyncModelSlice) Less ¶
func (s SyncModelSlice) Less(i, j int) bool
func (SyncModelSlice) List ¶
func (s SyncModelSlice) List() []pretty.Pretty
func (SyncModelSlice) Swap ¶
func (s SyncModelSlice) Swap(i, j int)
type UFTaskInfo ¶
type UploadFileRequest ¶
type UploadFileRequest struct {
// contains filtered or unexported fields
}
func NewUploadFileRequest ¶
func NewUploadFileRequest(fromPath, toPath string) *UploadFileRequest
func (UploadFileRequest) Execute ¶
func (r UploadFileRequest) Execute() (*UploadFileResponse, error)
func (UploadFileRequest) FromPath ¶
func (r UploadFileRequest) FromPath(path string) UploadFileRequest
func (UploadFileRequest) GetPartseq ¶
func (r UploadFileRequest) GetPartseq() string
func (*UploadFileRequest) IsSync ¶
func (r *UploadFileRequest) IsSync(s bool) *UploadFileRequest
func (*UploadFileRequest) RType ¶
func (r *UploadFileRequest) RType(t int32) *UploadFileRequest
func (UploadFileRequest) ToPath ¶
func (r UploadFileRequest) ToPath(path string) UploadFileRequest
func (UploadFileRequest) Type ¶
func (r UploadFileRequest) Type(typ string) UploadFileRequest
type UploadFileResponse ¶
type UploadFileResponse struct { Response FileInfoDto }
type UploadFragmentTasker ¶
type UploadFragmentTasker struct { *tasker.Tasker Request *UploadFileRequest Token *AccessToken UploadId string TmpDir string Fragments []string To string IsSync bool }
func (*UploadFragmentTasker) AfterRun ¶
func (u *UploadFragmentTasker) AfterRun() error
func (*UploadFragmentTasker) BeforeRun ¶
func (u *UploadFragmentTasker) BeforeRun() error
func (*UploadFragmentTasker) Build ¶
func (u *UploadFragmentTasker) Build() error
func (*UploadFragmentTasker) BuildTasks ¶
func (u *UploadFragmentTasker) BuildTasks() error
func (*UploadFragmentTasker) Exec ¶
func (u *UploadFragmentTasker) Exec() error
func (UploadFragmentTasker) RunTask ¶
func (u UploadFragmentTasker) RunTask(task *tasker.Task) error
type UploadTaskInfo ¶
type UploadTasker ¶
type UploadTasker struct { *tasker.Tasker // 迁移的地址 From string To string IsSync bool IsRecursion bool // 是否递归子文件夹文件 IsIncludeHide bool // 是否上传隐藏文件 // contains filtered or unexported fields }
func NewUploadDirTasker ¶
func NewUploadDirTasker(from, to string) (*UploadTasker, error)
func NewUploadTasker ¶
func NewUploadTasker(from, to string) (*UploadTasker, error)
func (*UploadTasker) AfterRun ¶
func (m *UploadTasker) AfterRun() error
func (*UploadTasker) BeforeRun ¶
func (u *UploadTasker) BeforeRun() error
func (*UploadTasker) BuildTasks ¶
func (m *UploadTasker) BuildTasks() error
func (*UploadTasker) Exec ¶
func (u *UploadTasker) Exec() error
func (*UploadTasker) GetExistFileMap ¶ added in v0.3.3
func (u *UploadTasker) GetExistFileMap() (map[string]FileInfoDto, error)
func (UploadTasker) RunTask ¶
func (m UploadTasker) RunTask(task *tasker.Task) error
func (*UploadTasker) SetRegexp ¶
func (u *UploadTasker) SetRegexp(pattern string) *UploadTasker
type UserInfoDto ¶
type UserInfoDto struct {
openapi.Uinforesponse
}
func UserInfo ¶
func UserInfo() (*UserInfoDto, error)
func (UserInfoDto) GetVipName ¶
func (u UserInfoDto) GetVipName() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.