Documentation ¶
Overview ¶
Package fileid contains BotAPI and tdlib file_id decoder.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeFileID ¶
EncodeFileID parses FileID to a string.
Types ¶
type FileID ¶
type FileID struct { Type Type DC int ID int64 AccessHash int64 FileReference []byte URL string PhotoSizeSource PhotoSizeSource }
FileID represents parsed Telegram Bot API file_id.
func DecodeFileID ¶
DecodeFileID parses FileID from a string.
func FromChatPhoto ¶
FromChatPhoto creates new FileID from ChatPhoto.
func FromDocument ¶
FromDocument creates FileID from tg.Document.
func (FileID) AsInputFileLocation ¶
func (f FileID) AsInputFileLocation() (tg.InputFileLocationClass, bool)
AsInputFileLocation converts file ID to tg.InputFileLocationClass.
func (FileID) AsInputWebFileLocation ¶
func (f FileID) AsInputWebFileLocation() (tg.InputWebFileLocationClass, bool)
AsInputWebFileLocation converts file ID to tg.InputWebFileLocationClass.
type PhotoSizeSource ¶
type PhotoSizeSource struct { Type PhotoSizeSourceType VolumeID int64 LocalID int Secret int64 PhotoSize string FileType Type ThumbnailType rune DialogID constant.TDLibPeerID DialogAccessHash int64 StickerSetID int64 StickerSetAccessHash int64 StickerVersion int32 }
PhotoSizeSource represents photo metadata stored in file_id.
type PhotoSizeSourceType ¶
type PhotoSizeSourceType int
PhotoSizeSourceType represents photo_size_source type.
const ( // PhotoSizeSourceLegacy is Legacy type. PhotoSizeSourceLegacy PhotoSizeSourceType = iota // PhotoSizeSourceThumbnail is Thumbnail type. PhotoSizeSourceThumbnail // PhotoSizeSourceDialogPhotoSmall is DialogPhotoSmall type. PhotoSizeSourceDialogPhotoSmall // PhotoSizeSourceDialogPhotoBig is DialogPhotoBig type. PhotoSizeSourceDialogPhotoBig // PhotoSizeSourceStickerSetThumbnail is StickerSetThumbnail type. PhotoSizeSourceStickerSetThumbnail // PhotoSizeSourceFullLegacy is FullLegacy type. PhotoSizeSourceFullLegacy // PhotoSizeSourceDialogPhotoSmallLegacy is DialogPhotoSmallLegacy type. PhotoSizeSourceDialogPhotoSmallLegacy // PhotoSizeSourceDialogPhotoBigLegacy is DialogPhotoBigLegacy type. PhotoSizeSourceDialogPhotoBigLegacy // PhotoSizeSourceStickerSetThumbnailLegacy is StickerSetThumbnailLegacy type. PhotoSizeSourceStickerSetThumbnailLegacy // PhotoSizeSourceStickerSetThumbnailVersion is StickerSetThumbnailVersion type. PhotoSizeSourceStickerSetThumbnailVersion )
func (PhotoSizeSourceType) String ¶
func (i PhotoSizeSourceType) String() string
type Type ¶
type Type int
Type represents file_id type.
const ( // Thumbnail is Thumbnail file type. Thumbnail Type = iota // ProfilePhoto is ProfilePhoto file type. ProfilePhoto // Photo is Photo file type. Photo // Voice is Voice file type. Voice // Video is Video file type. Video // Document is Document file type. Document // Encrypted is Encrypted file type. Encrypted // Temp is Temp file type. Temp // Sticker is Sticker file type. Sticker // Audio is Audio file type. Audio // Animation is Animation file type. Animation // EncryptedThumbnail is EncryptedThumbnail file type. EncryptedThumbnail // Wallpaper is Wallpaper file type. Wallpaper // VideoNote is VideoNote file type. VideoNote // SecureRaw is SecureRaw file type. SecureRaw // Secure is Secure file type. Secure // Background is Background file type. Background // DocumentAsFile is DocumentAsFile file type. DocumentAsFile )
Click to show internal directories.
Click to hide internal directories.