downloader

package
v0.0.0-...-3853e65 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2021 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectDownloader

type DirectDownloader struct {
	// MaxDownloadSize represents the maximum allowed download size for medias
	MaxDownloadSize int64
}

TelegramDownloader implements the download for telegram files.

func (*DirectDownloader) Download

func (d *DirectDownloader) Download(id, mediaType string, r *http.Request) (filename string, reader io.ReadCloser, err error)

Download downloads telegram files.

func (*DirectDownloader) GetMaxDownloadSize

func (d *DirectDownloader) GetMaxDownloadSize() int64

type Downloader

type Downloader interface {
	Download(id, mediaType string, r *http.Request) (filename string, reader io.ReadCloser, err error)
	GetMaxDownloadSize() int64
}

Downloader represents a generic handler for file downloads.

type TelegramDownloader

type TelegramDownloader struct {
	// MaxDownloadSize represents the maximum allowed download size for medias
	MaxDownloadSize int64
}

TelegramDownloader implements the download for telegram files.

func (*TelegramDownloader) Download

func (*TelegramDownloader) Download(id, mediaType string, r *http.Request) (filename string, reader io.ReadCloser, err error)

Download downloads telegram files.

func (*TelegramDownloader) GetMaxDownloadSize

func (d *TelegramDownloader) GetMaxDownloadSize() int64

Jump to

Keyboard shortcuts

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