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
Click to show internal directories.
Click to hide internal directories.