Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 NewProgressTracker ¶
func NewProgressTracker(messageID int, chatID int64) ProgressTracker
type Task ¶
type Task struct {
ID string
Ctx context.Context
Elems []TaskElement
Progress ProgressTracker
IgnoreErrors bool // if true, errors during processing will be ignored
// contains filtered or unexported fields
}
func NewBatchTGFileTask ¶
func NewBatchTGFileTask( id string, ctx context.Context, files []TaskElement, progress ProgressTracker, ignoreErrors bool, ) *Task
func (*Task) Downloaded ¶
func (*Task) Processing ¶
func (t *Task) Processing() []TaskElementInfo
type TaskElement ¶
type TaskElement struct {
ID string
Storage storage.Storage
Path string
File tfile.TGFile
// contains filtered or unexported fields
}
func NewTaskElement ¶
func (*TaskElement) FileName ¶
func (e *TaskElement) FileName() string
func (*TaskElement) FileSize ¶
func (e *TaskElement) FileSize() int64
func (*TaskElement) StorageName ¶
func (e *TaskElement) StorageName() string
func (*TaskElement) StoragePath ¶
func (e *TaskElement) StoragePath() string
type TaskElementInfo ¶
Click to show internal directories.
Click to hide internal directories.