tfile

package
v0.44.7 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TGFile

type TGFile interface {
	Location() tg.InputFileLocationClass
	Dler() downloader.Client // witch client to use for downloading
	Size() int64
	Name() string
	SetName(name string)
}

func FromMedia

func FromMedia(media tg.MessageMediaClass, client downloader.Client, opts ...TGFileOption) (TGFile, error)

func NewTGFile

func NewTGFile(
	location tg.InputFileLocationClass,
	dler downloader.Client,
	size int64,
	name string,
	opts ...TGFileOption,
) TGFile

type TGFileMessage

type TGFileMessage interface {
	TGFile
	Message() *tg.Message
}

func FromMediaMessage

func FromMediaMessage(media tg.MessageMediaClass, client downloader.Client, msg *tg.Message, opts ...TGFileOption) (TGFileMessage, error)

type TGFileOption added in v0.30.0

type TGFileOption func(*tgFile)

func WithMessage

func WithMessage(msg *tg.Message) TGFileOption

func WithName

func WithName(name string) TGFileOption

func WithNameIfEmpty

func WithNameIfEmpty(name string) TGFileOption

func WithSize

func WithSize(size int64) TGFileOption

func WithSizeIfZero

func WithSizeIfZero(size int64) TGFileOption

Jump to

Keyboard shortcuts

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