Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDownloader ¶ added in v0.25.0
func NewDownloader(file TGFile) *downloader.Builder
Types ¶
type TGFile ¶
type TGFile interface {
Location() tg.InputFileLocationClass
Dler() downloader.Client // witch client to use for downloading
Size() int64
Name() string
}
func FromMedia ¶
func FromMedia(media tg.MessageMediaClass, client downloader.Client, opts ...TGFileOptions) (TGFile, error)
func NewTGFile ¶
func NewTGFile( location tg.InputFileLocationClass, dler downloader.Client, size int64, name string, opts ...TGFileOptions, ) TGFile
type TGFileMessage ¶
func FromMediaMessage ¶
func FromMediaMessage(media tg.MessageMediaClass, client downloader.Client, msg *tg.Message, opts ...TGFileOptions) (TGFileMessage, error)
type TGFileOptions ¶
type TGFileOptions func(*tgFile)
func WithMessage ¶
func WithMessage(msg *tg.Message) TGFileOptions
func WithName ¶
func WithName(name string) TGFileOptions
func WithNameIfEmpty ¶
func WithNameIfEmpty(name string) TGFileOptions
func WithSize ¶
func WithSize(size int64) TGFileOptions
func WithSizeIfZero ¶
func WithSizeIfZero(size int64) TGFileOptions
Click to show internal directories.
Click to hide internal directories.