Documentation
¶
Index ¶
- type File
- type FileInfo
- type Progress
- type ProgressTracker
- type Task
- func (t *Task) DownloadedBytes() int64
- func (t *Task) Execute(ctx context.Context) error
- func (t *Task) Processing() []FileInfo
- func (t *Task) StorageName() string
- func (t *Task) StoragePath() string
- func (t *Task) TaskID() string
- func (t *Task) Title() string
- func (t *Task) TotalBytes() int64
- func (t *Task) TotalFiles() int
- func (t *Task) Type() tasktype.TaskType
- type TaskInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Progress ¶
type Progress struct {
// contains filtered or unexported fields
}
func (*Progress) OnProgress ¶
OnProgress implements ProgressTracker.
type ProgressTracker ¶
type ProgressTracker interface {
OnStart(ctx context.Context, info TaskInfo)
OnProgress(ctx context.Context, info TaskInfo)
OnDone(ctx context.Context, info TaskInfo, err error)
}
func NewProgress ¶
func NewProgress(msgID int, userID int64) ProgressTracker
type Task ¶
type Task struct {
ID string
Storage storage.Storage
StorPath string
Progress ProgressTracker
// contains filtered or unexported fields
}
func (*Task) DownloadedBytes ¶
DownloadedBytes implements TaskInfo.
Click to show internal directories.
Click to hide internal directories.