downloader

package
v0.1.0-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2022 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const TempExt = ".tmp"

Variables

This section is empty.

Functions

This section is empty.

Types

type Downloader

type Downloader struct {
	// contains filtered or unexported fields
}

func New

func New(client *tg.Client, partSize int, threads int, iter Iter) *Downloader

func (*Downloader) Download

func (d *Downloader) Download(ctx context.Context, limit int) error

type Item

type Item struct {
	InputFileLoc tg.InputFileLocationClass
	Name         string
	Size         int64
}

type Iter

type Iter interface {
	Next(ctx context.Context) bool
	Value(ctx context.Context) (*Item, error)
	Total(ctx context.Context) int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL