Documentation
¶
Index ¶
- type Animation
- type Audio
- type CallbackQuery
- type Chat
- type ChatType
- type ChatsRepo
- type ChosenInlineResult
- type Contact
- type Document
- type EncryptedCredentials
- type EncryptedPassportElement
- type Game
- type InlineKeyboardButton
- type InlineKeyboardMarkup
- type InlineQuery
- type Invoice
- type Location
- type Logger
- type LoginURL
- type MaskPosition
- type MaskPositionPoint
- type Message
- type MessageEntity
- type MessageEntityType
- type OrderInfo
- type PassportData
- type PassportElementType
- type PassportFile
- type PhotoSize
- type Poll
- type PollOption
- type PreCheckoutQuery
- type ShippingAddress
- type ShippingQuery
- type Sticker
- type SuccessfulPayment
- type Update
- type UpdatesRepo
- type User
- type UsersRepo
- type Venue
- type Video
- type VideoNote
- type Voice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Animation ¶
type Animation struct { FileID string `bson:"file_id,omitempty"` Width int `bson:"width,omitempty"` Height int `bson:"height,omitempty"` Duration time.Time `bson:"duration,omitempty"` Thumb *PhotoSize `bson:"thumb,omitempty"` FileName *string `bson:"file_name,omitempty"` MimeType *string `bson:"mime_type,omitempty"` FileSize *int64 `bson:"file_size,omitempty"` }
type Audio ¶
type Audio struct { FileID string `bson:"file_id,omitempty"` Duration time.Time `bson:"duration,omitempty"` Performer *string `bson:"performer,omitempty"` Title *string `bson:"title,omitempty"` MimeType *string `bson:"mime_type,omitempty"` FileSize *int64 `bson:"file_size,omitempty"` Thumb *PhotoSize `bson:"thumb,omitempty"` }
type CallbackQuery ¶
type CallbackQuery struct { ID string `bson:"id,omitempty"` From User `bson:"from,omitempty"` Message *Message `bson:"message,omitempty"` InlineMessageID *string `bson:"inline_message_id,omitempty"` ChatInstance string `bson:"chat_instance,omitempty"` Data *string `bson:"data,omitempty"` GameShortName *string `bson:"game_short_name,omitempty"` }
type ChosenInlineResult ¶
type EncryptedCredentials ¶
type EncryptedPassportElement ¶
type EncryptedPassportElement struct { Type PassportElementType `bson:"type,omitempty"` Data *string `bson:"data,omitempty"` PhoneNumber *string `bson:"phone_number,omitempty"` Email *string `bson:"email,omitempty"` Files []PassportFile `bson:"files,omitempty"` FrontSide []PassportFile `bson:"front_side,omitempty"` ReverseSide []PassportFile `bson:"reverse_side,omitempty"` Selfie []PassportFile `bson:"selfie,omitempty"` Translation []PassportFile `bson:"translation,omitempty"` Hash string `bson:"hash,omitempty"` }
type Game ¶
type Game struct { Title string `bson:"title,omitempty"` Description string `bson:"description,omitempty"` Photo []PhotoSize `bson:"photo,omitempty"` Text *string `bson:"text,omitempty"` TextEntities []MessageEntity `bson:"text_entities,omitempty"` Animation *Animation `bson:"animation,omitempty"` }
type InlineKeyboardButton ¶
type InlineKeyboardButton struct { Text string `bson:"text,omitempty"` URL *string `bson:"url,omitempty"` LoginURL *LoginURL `bson:"login_url,omitempty"` CallbackData *string `bson:"callback_data,omitempty"` SwitchInlineQuery *string `bson:"switch_inline_query,omitempty"` SwitchInlineQueryCurrentChat *string `bson:"switch_inline_query_current_chat,omitempty"` CallbackGame *Game `bson:"callback_game,omitempty"` Pay *bool `bson:"pay,omitempty"` }
type InlineKeyboardMarkup ¶
type InlineKeyboardMarkup struct {
InlineKeyboard [][]InlineKeyboardButton `bson:"inline_keyboard,omitempty"`
}
type InlineQuery ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func NewUpdatesLogger ¶
func NewUpdatesLogger(r UpdatesRepo) *Logger
type MaskPosition ¶
type MaskPosition struct { Point MaskPositionPoint `bson:"point,omitempty"` XShift float32 `bson:"x_shift,omitempty"` YShift float32 `bson:"y_shift,omitempty"` Scale float32 `bson:"scale,omitempty"` }
type MaskPositionPoint ¶
type MaskPositionPoint string
const ( ForeheadMaskPositionPoint MaskPositionPoint = "forehead" EyesMaskPositionPoint MaskPositionPoint = "eyes" MouthMaskPositionPoint MaskPositionPoint = "mouth" ChinMaskPositionPoint MaskPositionPoint = "chin" )
type Message ¶
type Message struct { MessageID int64 `bson:"message_id,omitempty"` From *User `bson:"from,omitempty"` Date time.Time `bson:"date,omitempty"` Chat *Chat `bson:"chat,omitempty"` ForwardFrom *User `bson:"forward_from,omitempty"` ForwardFromChat *Chat `bson:"forward_from_chat,omitempty"` ForwardFromMessageID *int64 `bson:"forward_from_message_id,omitempty"` ForwardSignature *string `bson:"forward_signature,omitempty"` ForwardSenderName *string `bson:"forward_sender_name,omitempty"` ForwardDate *time.Time `bson:"forward_date,omitempty"` ReplyToMessage *Message `bson:"reply_to_message,omitempty"` EditDate *time.Time `bson:"edit_date,omitempty"` MediaGroupID *string `bson:"media_group_id,omitempty"` AuthorSignature *string `bson:"author_signature,omitempty"` Text *string `bson:"text,omitempty"` Entities []MessageEntity `bson:"entities,omitempty"` CaptionEntities []MessageEntity `bson:"caption_entities,omitempty"` Audio *Audio `bson:"audio,omitempty"` Document *Document `bson:"document,omitempty"` Animation *Animation `bson:"animation,omitempty"` Game *Game `bson:"game,omitempty"` Photo []PhotoSize `bson:"photo,omitempty"` Sticker *Sticker `bson:"sticker,omitempty"` Video *Video `bson:"video,omitempty"` Voice *Voice `bson:"voice,omitempty"` VideoNote *VideoNote `bson:"video_note,omitempty"` Caption *string `bson:"caption,omitempty"` Contact *Contact `bson:"contact,omitempty"` Location *Location `bson:"location,omitempty"` Venue *Venue `bson:"venue,omitempty"` Poll *Poll `bson:"poll,omitempty"` NewChatMembers []User `bson:"new_chat_members,omitempty"` LeftChatMember *User `bson:"left_chat_member,omitempty"` NewChatTitle *string `bson:"new_chat_title,omitempty"` NewChatPhoto []PhotoSize `bson:"new_chat_photo,omitempty"` DeleteChatPhoto bool `bson:"delete_chat_photo,omitempty"` GroupChatCreated bool `bson:"group_chat_created,omitempty"` SupergroupChatCreated bool `bson:"supergroup_chat_created,omitempty"` ChannelChatCreated bool `bson:"channel_chat_created,omitempty"` MigrateToChatID *int64 `bson:"migrate_to_chat_id,omitempty"` MigrateFromChatID *int64 `bson:"migrate_from_chat_id,omitempty"` PinnedMessage *Message `bson:"pinned_message,omitempty"` Invoice *Invoice `bson:"invoice,omitempty"` SuccessfulPayment *SuccessfulPayment `bson:"successful_payment,omitempty"` ConnectedWebsite *string `bson:"connected_website,omitempty"` PassportData *PassportData `bson:"passport_data,omitempty"` ReplyMarkup *InlineKeyboardMarkup `bson:"reply_markup,omitempty"` }
type MessageEntity ¶
type MessageEntity struct { Type MessageEntityType `bson:"type,omitempty"` Offset int `bson:"offset,omitempty"` Length int `bson:"length,omitempty"` URL *string `bson:"url,omitempty"` User *User `bson:"user,omitempty"` }
type MessageEntityType ¶
type MessageEntityType string
const ( HashtagMessageEntityType MessageEntityType = "hashtag" CashtagMessageEntityType MessageEntityType = "cashtag" BotCommandMessageEntityType MessageEntityType = "bot_command" URLMessageEntityType MessageEntityType = "url" EmailMessageEntityType MessageEntityType = "email" PhoneNumberMessageEntityType MessageEntityType = "phone_number" BoldMessageEntityType MessageEntityType = "bold" ItalicMessageEntityType MessageEntityType = "italic" CodeEntityType MessageEntityType = "code" PreMessageEntityType MessageEntityType = "pre" TextLinkMessageEntityType MessageEntityType = "text_link" TextMentionMessageEntityType MessageEntityType = "text_mention" )
type OrderInfo ¶
type OrderInfo struct { Name *string `bson:"name,omitempty"` PhoneNumber *string `bson:"phone_number,omitempty"` Email *string `bson:"email,omitempty"` ShippingAddress *ShippingAddress `bson:"shipping_address,omitempty"` }
type PassportData ¶
type PassportData struct { Data *EncryptedPassportElement `bson:"data,omitempty"` Credentials *EncryptedCredentials `bson:"credentials,omitempty"` }
type PassportElementType ¶
type PassportElementType string
const ( PersonalDetailsPassportElementType PassportElementType = "personal_details" PassportPassportElementType PassportElementType = "passport" DriverLicensePassportElementType PassportElementType = "driver_license" IdentityCardPassportElementType PassportElementType = "identity_card" InternalPassportPassportElementType PassportElementType = "internal_passport" AddressPassportElementType PassportElementType = "address" UtilityBillPassportElementType PassportElementType = "utility_bill" BankStatementPassportElementType PassportElementType = "bank_statement" RentalAgreementPassportElementType PassportElementType = "rental_agreement" PassportRegistrationPassportElementType PassportElementType = "passport_registration" TemporaryRegistrationPassportElementType PassportElementType = "temporary_registration" PhoneNumberPassportElementType PassportElementType = "phone_number" EmailPassportElementType PassportElementType = "email" )
type PassportFile ¶
type Poll ¶
type Poll struct { ID string `bson:"id,omitempty"` Question string `bson:"question,omitempty"` Options []PollOption `bson:"options,omitempty"` IsClosed bool `bson:"is_closed,omitempty"` }
type PollOption ¶
type PreCheckoutQuery ¶
type PreCheckoutQuery struct { ID string `bson:"id,omitempty"` From User `bson:"from,omitempty"` Currency string `bson:"currency,omitempty"` TotalAmount int `bson:"total_amount,omitempty"` InvoicePayload string `bson:"invoice_payload,omitempty"` ShippingOptionID *string `bson:"shipping_option_id,omitempty"` OrderInfo *OrderInfo `bson:"order_info,omitempty"` }
type ShippingAddress ¶
type ShippingAddress struct { CountryCode string `bson:"country_code,omitempty"` State string `bson:"state,omitempty"` City string `bson:"city,omitempty"` StreetLine1 string `bson:"street_line1,omitempty"` StreetLine2 string `bson:"street_line2,omitempty"` PostCode string `bson:"post_code,omitempty"` }
type ShippingQuery ¶
type ShippingQuery struct { ID string `bson:"id,omitempty"` From User `bson:"from,omitempty"` InvoicePayload string `bson:"invoice_payload,omitempty"` ShippingAddress ShippingAddress `bson:"shipping_address,omitempty"` }
type Sticker ¶
type Sticker struct { FileID string `bson:"file_id,omitempty"` Width int `bson:"width,omitempty"` Height int `bson:"height,omitempty"` IsAnimated bool `bson:"is_animated,omitempty"` Thumb *PhotoSize `bson:"thumb,omitempty"` Emoji *string `bson:"emoji,omitempty"` SetName *string `bson:"set_name,omitempty"` MaskPosition *MaskPosition `bson:"mask_position,omitempty"` FileSize *int64 `bson:"file_size,omitempty"` }
type SuccessfulPayment ¶
type SuccessfulPayment struct { Currency string `bson:"currency,omitempty"` TotalAmount int `bson:"total_amount,omitempty"` InvoicePayload string `bson:"invoice_payload,omitempty"` ShippingOptionID *string `bson:"shipping_option_id,omitempty"` OrderInfo *OrderInfo `bson:"order_info,omitempty"` TelegramPaymentChargeID string `bson:"telegram_payment_charge_id,omitempty"` ProviderPaymentChargeID string `bson:"provider_payment_charge_id,omitempty"` }
type Update ¶
type Update struct { UpdateID int64 `bson:"update_id,omitempty"` Message *Message `bson:"message,omitempty"` EditedMessage *Message `bson:"edited_message,omitempty"` ChannelPost *Message `bson:"channel_post,omitempty"` EditedChannelPost *Message `bson:"edited_channel_post,omitempty"` InlineQuery *InlineQuery `bson:"inline_query,omitempty"` ChosenInlineResult *ChosenInlineResult `bson:"chosen_inline_result,omitempty"` CallbackQuery *CallbackQuery `bson:"callback_query,omitempty"` ShippingQuery *ShippingQuery `bson:"shipping_query,omitempty"` PreCheckoutQuery *PreCheckoutQuery `bson:"pre_checkout_query,omitempty"` Poll *Poll `bson:"poll,omitempty"` }
type UpdatesRepo ¶
type Video ¶
type Video struct { FileID string `bson:"file_id,omitempty"` Width int `bson:"width,omitempty"` Height int `bson:"height,omitempty"` Duration time.Duration `bson:"duration,omitempty"` Thumb *PhotoSize `bson:"thumb,omitempty"` MimeType *string `bson:"mime_type,omitempty"` FileSize *int64 `bson:"file_size,omitempty"` }
Source Files
¶
- animations.go
- audios.go
- callback_queries.go
- chats.go
- chosen_inline_results.go
- contacts.go
- documents.go
- games.go
- inline_keyboards.go
- inline_queries.go
- locations.go
- message_entities.go
- messages.go
- passports.go
- payments.go
- photo_sizes.go
- polls.go
- stickers.go
- updates.go
- users.go
- venues.go
- video_notes.go
- videos.go
- voices.go
Click to show internal directories.
Click to hide internal directories.