Documentation ¶
Index ¶
- type Animation
- type AnimationSender
- type AnswerCallbackQueryRequest
- type AnswerInlineQueryRequest
- type Audio
- type AudioSender
- type BaseClient
- func (c BaseClient) AnswerCallbackQuery(request AnswerCallbackQueryRequest) error
- func (c BaseClient) AnswerInlineQuery(request AnswerInlineQueryRequest) (bool, error)
- func (c BaseClient) DeleteMessage(request DeleteMessageRequest) (bool, error)
- func (c BaseClient) DownloadFile(filePath string) ([]byte, error)
- func (c BaseClient) EditMessageReplyMarkup(request EditMessageReplyMarkupRequest) (*Message, error)
- func (c BaseClient) EditMessageText(request EditMessageTextRequest) (*Message, error)
- func (c BaseClient) ForwardMessage(request ForwardMessageRequest) (*Message, error)
- func (c BaseClient) GetFile(request GetFileRequest) (*File, error)
- func (c BaseClient) GetMe() (*User, error)
- func (c BaseClient) GetUpdates(request GetUpdatesRequest) (*[]Update, error)
- func (c BaseClient) SendAudio(request SendAudioRequest) (interface{}, error)
- func (c BaseClient) SendMessage(request SendMessageRequest) (*Message, error)
- func (c BaseClient) SendPhoto(request SendPhotoRequest) (interface{}, error)
- type CallbackGame
- type CallbackQuery
- type CaptionSource
- type Chat
- type ChatAction
- type ChatMember
- type ChatOperations
- type ChatPermissions
- type ChatPhoto
- type ChatRequest
- type ChosenInlineResult
- type Client
- type Contact
- type ContactSender
- type DeleteMessageRequest
- type DescriptionSource
- type DisableNotificationsSource
- type Document
- type DocumentSender
- type EditMessageReplyMarkupRequest
- type EditMessageTextRequest
- type EncryptedCredentials
- type EncryptedPassportElement
- type EntityType
- type File
- type FileGetter
- type FormDataFiller
- type ForwardMessageRequest
- type Game
- type GetChatMemberRequest
- type GetFileRequest
- type GetFileResponse
- type GetUpdatesRequest
- type GetUserProfilePhotosRequest
- type IDAndTypeSource
- type InlineKeyboardButton
- type InlineKeyboardMarkup
- type InlineQuery
- type InlineQueryAnswerer
- type InlineQueryResultArticle
- type InlineQueryResultAudio
- type InlineQueryResultCachedAudio
- type InlineQueryResultCachedDocument
- type InlineQueryResultCachedGif
- type InlineQueryResultCachedMpeg4Gif
- type InlineQueryResultCachedPhoto
- type InlineQueryResultCachedSticker
- type InlineQueryResultCachedVideo
- type InlineQueryResultCachedVoice
- type InlineQueryResultContact
- type InlineQueryResultDocument
- type InlineQueryResultGame
- type InlineQueryResultGif
- type InlineQueryResultLocation
- type InlineQueryResultMpeg4Gif
- type InlineQueryResultPhoto
- type InlineQueryResultType
- type InlineQueryResultVenue
- type InlineQueryResultVideo
- type InlineQueryResultVoice
- type InputContactMessageContent
- type InputLocationMessageContent
- type InputMessageContentSource
- type InputTextMessageContent
- type InputVenueMessageContent
- type Invoice
- type KeyboardButton
- type Location
- type LocationSender
- type LoginUrl
- type MaskPosition
- type MeGetter
- type MediaGroupSender
- type Message
- type MessageDeleter
- type MessageEntity
- type MessageForwarder
- type MessageReplyMarkupEditor
- type MessageSender
- type MessageTextEditor
- type OrderInfo
- type ParseMode
- type ParseModeSource
- type PassportData
- type PassportFile
- type PhotoSender
- type PhotoSize
- type PinChatMessageRequest
- type Poll
- type PollOption
- type PollSender
- type PreCheckoutQuery
- type ReplyKeyboardMarkup
- type ReplyKeyboardRemove
- type ReplyMarkupSource
- type ReplyToMessageIDSource
- type ResponseParameters
- type ResponseWrapper
- type SendAnimationRequest
- type SendAudioRequest
- type SendChatActionRequest
- type SendContactRequest
- type SendDocumentRequest
- type SendLocationRequest
- type SendMediaGroupRequest
- type SendMessageRequest
- type SendPhotoRequest
- type SendPollRequest
- type SendVideoNoteRequest
- type SendVideoRequest
- type SendVoiceRequest
- type SetChatDescriptionRequest
- type SetChatPhotoRequest
- type SetChatStickerSetRequest
- type SetChatTitleRequest
- type ShippingAddress
- type ShippingQuery
- type Sticker
- type SuccessfulPayment
- type ThumbSource
- type TitleSource
- type Update
- type UpdateType
- type UpdatesGetter
- type User
- type UserProfilePhotos
- type Venue
- type Video
- type VideoNote
- type VideoNoteSender
- type VideoSender
- type Voice
- type VoiceSender
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnimationSender ¶
type AnimationSender interface {
SendAnimation(SendAnimationRequest) (*Message, error)
}
type AnswerInlineQueryRequest ¶
type AnswerInlineQueryRequest struct { InlineQueryId string `json:"inline_query_id"` Results []interface{} `json:"results"` CacheTime int `json:"cache_time"` IsPersonal bool `json:"is_personal"` NextOffset string `json:"next_offset"` SwitchPmText string `json:"switch_pm_text"` SwitchPmParameter string `json:"switch_pm_parameter"` }
type AudioSender ¶
type AudioSender interface {
SendAudio(SendAudioRequest) (*Message, error)
}
type BaseClient ¶
type BaseClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(apiToken string, longPollingTimeout int) *BaseClient
func (BaseClient) AnswerCallbackQuery ¶
func (c BaseClient) AnswerCallbackQuery(request AnswerCallbackQueryRequest) error
func (BaseClient) AnswerInlineQuery ¶
func (c BaseClient) AnswerInlineQuery(request AnswerInlineQueryRequest) (bool, error)
func (BaseClient) DeleteMessage ¶
func (c BaseClient) DeleteMessage(request DeleteMessageRequest) (bool, error)
func (BaseClient) DownloadFile ¶
func (c BaseClient) DownloadFile(filePath string) ([]byte, error)
func (BaseClient) EditMessageReplyMarkup ¶
func (c BaseClient) EditMessageReplyMarkup(request EditMessageReplyMarkupRequest) (*Message, error)
func (BaseClient) EditMessageText ¶
func (c BaseClient) EditMessageText(request EditMessageTextRequest) (*Message, error)
func (BaseClient) ForwardMessage ¶
func (c BaseClient) ForwardMessage(request ForwardMessageRequest) (*Message, error)
func (BaseClient) GetFile ¶
func (c BaseClient) GetFile(request GetFileRequest) (*File, error)
func (BaseClient) GetMe ¶
func (c BaseClient) GetMe() (*User, error)
func (BaseClient) GetUpdates ¶
func (c BaseClient) GetUpdates(request GetUpdatesRequest) (*[]Update, error)
func (BaseClient) SendAudio ¶
func (c BaseClient) SendAudio(request SendAudioRequest) (interface{}, error)
func (BaseClient) SendMessage ¶
func (c BaseClient) SendMessage(request SendMessageRequest) (*Message, error)
func (BaseClient) SendPhoto ¶
func (c BaseClient) SendPhoto(request SendPhotoRequest) (interface{}, error)
type CallbackGame ¶
type CallbackGame struct { }
type CallbackQuery ¶
type CaptionSource ¶
type CaptionSource struct {
Caption string `json:"caption,omitempty"`
}
type Chat ¶
type Chat struct { ID int `json:"id"` Type string `json:"type"` Title string `json:"title"` Username string `json:"username"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Photo *ChatPhoto `json:"photo"` Description string `json:"description"` InviteLink string `json:"invite_link"` PinnedMessage *Message `json:"pinned_message"` Permissions *ChatPermissions `json:"permissions"` StickerSetName string `json:"sticker_set_name"` CanSetStickerSet bool `json:"can_set_sticker_set"` }
type ChatAction ¶
type ChatAction string
const ( ChatActionTyping ChatAction = "typing" ChatActionUploadPhoto ChatAction = "upload_photo" ChatActionRecordVideo ChatAction = "record_video" ChatActionUploadVideo ChatAction = "upload_video" ChatActionRecordAudio ChatAction = "record_audio" ChatActionUploadAudio ChatAction = "upload_audio" ChatActionUploadDocument ChatAction = "upload_document" ChatActionFindLocation ChatAction = "find_location" ChatActionRecordVideoNote ChatAction = "record_video_note" ChatActionUploadVideoNote ChatAction = "upload_video_note" )
type ChatMember ¶
type ChatMember struct { ChatPermissions User *User `json:"user"` Status string `json:"status"` UntilDate int `json:"until_date"` CanBeEdited bool `json:"can_be_edited"` CanPostMessages bool `json:"can_post_messages"` CanEditMessages bool `json:"can_edit_messages"` CanDeleteMessages bool `json:"can_delete_messages"` CanRestrictMembers bool `json:"can_restrict_members"` CanPromoteMembers bool `json:"can_promote_members"` IsMember bool `json:"is_member"` }
type ChatOperations ¶
type ChatOperations interface { SetChatPhoto(SetChatPhotoRequest) bool DeleteChatPhoto(ChatRequest) bool SetChatTitle(SetChatTitleRequest) bool SetChatDescription(SetChatDescriptionRequest) bool PinChatMessage(PinChatMessageRequest) bool UnpinChatMessage(ChatRequest) bool LeaveChat(ChatRequest) bool GetChat(ChatRequest) Chat GetChatAdministrators(ChatRequest) []ChatMember GetChatMembersCount(ChatRequest) int GetChatMember(GetChatMemberRequest) ChatMember SetChatStickerSet(SetChatStickerSetRequest) bool DeleteChatStickerSet(ChatRequest) bool }
type ChatPermissions ¶
type ChatPermissions struct { CanSendMessages bool `json:"can_send_messages"` CanSendMediaMessages bool `json:"can_send_media_messages"` CanSendPolls bool `json:"can_send_polls"` CanSendOtherMessages bool `json:"can_send_other_messages"` CanAddWebPagePreviews bool `json:"can_add_web_page_previews"` CanChangeInfo bool `json:"can_change_info"` CanInviteUsers bool `json:"can_invite_users"` CanPinMessages bool `json:"can_pin_messages"` }
type ChatRequest ¶
type ChatRequest struct {
ChatID int `json:"chat_id"`
}
func (ChatRequest) FillFormData ¶
type ChosenInlineResult ¶
type Client ¶
type Client interface { MeGetter MessageSender MessageForwarder MessageDeleter PhotoSender AudioSender FileGetter DocumentSender VideoSender AnimationSender VoiceSender VideoNoteSender MediaGroupSender LocationSender ContactSender PollSender SendChatAction(SendChatActionRequest) bool GetUserProfilePhotos(GetUserProfilePhotosRequest) UserProfilePhotos ChatOperations AnswerCallbackQuery(AnswerCallbackQueryRequest) bool InlineQueryAnswerer }
type ContactSender ¶
type ContactSender interface {
SendContact(SendContactRequest) (*Message, error)
}
type DeleteMessageRequest ¶
type DeleteMessageRequest struct { ChatRequest MessageID int `json:"message_id,omitempty"` }
type DescriptionSource ¶
type DescriptionSource struct {
Description string `json:"description"`
}
type DisableNotificationsSource ¶
type DisableNotificationsSource struct {
DisableNotification bool `json:"disable_notification,omitempty"`
}
type DocumentSender ¶
type DocumentSender interface {
SendDocument(SendDocumentRequest) (*Message, error)
}
type EditMessageReplyMarkupRequest ¶
type EditMessageReplyMarkupRequest struct { ChatRequest MessageID int `json:"message_id"` InlineMessageID int `json:"inline_message_id"` ReplyMarkup interface{} `json:"reply_markup"` }
type EditMessageTextRequest ¶
type EditMessageTextRequest struct { ChatRequest ParseModeSource ReplyMarkupSource MessageID int `json:"message_id"` InlineMessageID int `json:"inline_message_id"` Text string `json:"text"` DisableWebPagePreview bool `json:"disable_web_page_preview"` }
type EncryptedCredentials ¶
type EncryptedPassportElement ¶
type EncryptedPassportElement struct { Type string `json:"type"` Data string `json:"data"` PhoneNumber string `json:"phone_number"` Email string `json:"email"` Files []PassportFile `json:"files"` FrontSide *PassportFile `json:"front_side"` ReverseSide *PassportFile `json:"reverse_side"` Selfie *PassportFile `json:"selfie"` Translation []PassportFile `json:"translation"` Hash string `json:"hash"` }
type EntityType ¶
type EntityType string
const ( EntityTypeMention EntityType = "mention" EntityTypeHashtag EntityType = "hashtag" EntityTypeCashtag EntityType = "cashtag" EntityTypeBotCommand EntityType = "bot_command" EntityTypeUrl EntityType = "url" EntityTypeEmail EntityType = "email" EntityTypePhoneNumber EntityType = "phone_number" EntityTypeBold EntityType = "bold" EntityTypeItalic EntityType = "italic" EntityTypeCode EntityType = "code" EntityTypePre EntityType = "pre" EntityTypeTextLink EntityType = "text_link" EntityTypeTextMention EntityType = "text_mention" )
type FileGetter ¶
type FileGetter interface {
GetFile(GetFileRequest) (*File, error)
}
type FormDataFiller ¶
type ForwardMessageRequest ¶
type ForwardMessageRequest struct { ChatRequest DisableNotificationsSource FromChatID int `json:"from_chat_id"` MessageID int `json:"message_id"` }
type GetChatMemberRequest ¶
type GetChatMemberRequest struct { ChatRequest UserID int `json:"user_id"` }
type GetFileRequest ¶
type GetFileRequest struct {
FileID string `json:"file_id"`
}
type GetFileResponse ¶
type GetUpdatesRequest ¶
type GetUpdatesRequest struct { Offset int `json:"offset"` Limit int `json:"limit"` Timeout int `json:"timeout"` AllowedUpdates []UpdateType `json:"allowed_updates"` }
type IDAndTypeSource ¶
type IDAndTypeSource struct { Type InlineQueryResultType `json:"type"` ID string `json:"id"` }
type InlineKeyboardButton ¶
type InlineKeyboardButton struct { Text string `json:"text,omitempty"` Url string `json:"url,omitempty"` LoginUrl *LoginUrl `json:"login_url,omitempty"` CallbackData string `json:"callback_data,omitempty"` SwitchInlineQuery string `json:"switch_inline_query,omitempty"` SwitchInlineQueryCurrentChat string `json:"switch_inline_query_current_chat,omitempty"` CallbackGame *CallbackGame `json:"callback_game,omitempty"` Pay bool `json:"pay,omitempty"` }
type InlineKeyboardMarkup ¶
type InlineKeyboardMarkup struct {
InlineKeyboard [][]InlineKeyboardButton `json:"inline_keyboard"`
}
type InlineQuery ¶
type InlineQueryAnswerer ¶
type InlineQueryAnswerer interface {
AnswerInlineQuery(AnswerInlineQueryRequest) (bool, error)
}
type InlineQueryResultArticle ¶
type InlineQueryResultArticle struct { IDAndTypeSource InputMessageContentSource ReplyMarkupSource TitleSource Url string `json:"url"` HideUrl bool `json:"hide_url"` DescriptionSource ThumbUrl string `json:"thumb_url"` ThumbWidth int `json:"thumb_width"` ThumbHeight int `json:"thumb_height"` }
type InlineQueryResultAudio ¶
type InlineQueryResultAudio struct { IDAndTypeSource InputMessageContentSource ReplyMarkupSource AudioUrl string `json:"audio_url"` TitleSource CaptionSource ParseModeSource Performer string `json:"performer"` AudioDuration int `json:"audio_duration"` }
type InlineQueryResultCachedAudio ¶
type InlineQueryResultCachedAudio struct { IDAndTypeSource InputMessageContentSource ReplyMarkupSource AudioFileID string `json:"audio_file_id"` CaptionSource ParseModeSource }
type InlineQueryResultCachedDocument ¶
type InlineQueryResultCachedDocument struct { IDAndTypeSource InputMessageContentSource ReplyMarkupSource TitleSource DocumentFileID string `json:"document_file_id"` DescriptionSource CaptionSource ParseModeSource }
type InlineQueryResultCachedGif ¶
type InlineQueryResultCachedGif struct { IDAndTypeSource InputMessageContentSource ReplyMarkupSource GifFileID string `json:"gif_file_id"` TitleSource CaptionSource ParseModeSource }
type InlineQueryResultCachedMpeg4Gif ¶
type InlineQueryResultCachedMpeg4Gif struct { IDAndTypeSource InputMessageContentSource ReplyMarkupSource Mpeg4FileID string `json:"mpeg4_file_id"` TitleSource CaptionSource ParseModeSource }
type InlineQueryResultCachedPhoto ¶
type InlineQueryResultCachedPhoto struct { IDAndTypeSource InputMessageContentSource ReplyMarkupSource PhotoFileID string `json:"photo_file_id"` TitleSource DescriptionSource CaptionSource ParseModeSource }
type InlineQueryResultCachedSticker ¶
type InlineQueryResultCachedSticker struct { IDAndTypeSource InputMessageContentSource ReplyMarkupSource StickerFileID string `json:"sticker_file_id"` }
type InlineQueryResultCachedVideo ¶
type InlineQueryResultCachedVideo struct { ReplyMarkupSource IDAndTypeSource InputMessageContentSource VideoFileID string `json:"video_file_id"` TitleSource DescriptionSource CaptionSource ParseModeSource }
type InlineQueryResultCachedVoice ¶
type InlineQueryResultCachedVoice struct { ReplyMarkupSource IDAndTypeSource InputMessageContentSource VoiceFileID string `json:"voice_file_id"` TitleSource CaptionSource ParseModeSource }
type InlineQueryResultContact ¶
type InlineQueryResultContact struct { IDAndTypeSource InputMessageContentSource ReplyMarkupSource PhoneNumber string `json:"phone_number"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Vcard string `json:"vcard"` ThumbUrl string `json:"thumb_url"` ThumbWidth int `json:"thumb_width"` ThumbHeight int `json:"thumb_height"` }
type InlineQueryResultDocument ¶
type InlineQueryResultDocument struct { IDAndTypeSource InputMessageContentSource ReplyMarkupSource TitleSource CaptionSource ParseModeSource DocumentUrl string `json:"document_url"` MimeType string `json:"mime_type"` DescriptionSource ThumbUrl string `json:"thumb_url"` ThumbWidth int `json:"thumb_width"` ThumbHeight int `json:"thumb_height"` }
type InlineQueryResultGame ¶
type InlineQueryResultGame struct { IDAndTypeSource ReplyMarkupSource GameShortName string `json:"game_short_name"` }
type InlineQueryResultGif ¶
type InlineQueryResultGif struct { IDAndTypeSource InputMessageContentSource ReplyMarkupSource GifUrl string `json:"gif_url"` GifWidth int `json:"gif_width"` GifHeight int `json:"gif_height"` GifDuration int `json:"gif_duration"` ThumbUrl string `json:"thumb_url"` TitleSource CaptionSource ParseModeSource }
type InlineQueryResultLocation ¶
type InlineQueryResultLocation struct { IDAndTypeSource InputMessageContentSource ReplyMarkupSource Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` Title string `json:"title"` LivePeriod int `json:"live_period"` ThumbUrl string `json:"thumb_url"` ThumbWidth int `json:"thumb_width"` ThumbHeight int `json:"thumb_height"` }
type InlineQueryResultMpeg4Gif ¶
type InlineQueryResultMpeg4Gif struct { IDAndTypeSource InputMessageContentSource Mpeg4Url string `json:"mpeg4_url"` Mpeg4Width int `json:"mpeg4_width"` Mpeg4Height int `json:"mpeg4_height"` Mpeg4Duration int `json:"mpeg4_duration"` ThumbUrl string `json:"thumb_url"` TitleSource CaptionSource ParseModeSource ReplyMarkupSource }
type InlineQueryResultPhoto ¶
type InlineQueryResultPhoto struct { IDAndTypeSource InputMessageContentSource ReplyMarkupSource PhotoUrl string `json:"photo_url"` ThumbUrl string `json:"thumb_url"` PhotoWidth int `json:"photo_width"` PhotoHeight int `json:"photo_height"` TitleSource DescriptionSource CaptionSource ParseModeSource }
type InlineQueryResultType ¶
type InlineQueryResultType string
const ( InlineQueryResultTypeArticle InlineQueryResultType = "article" InlineQueryResultTypePhoto InlineQueryResultType = "photo" InlineQueryResultTypeGif InlineQueryResultType = "gif" InlineQueryResultTypeMpeg4Gif InlineQueryResultType = "mpeg4_gif" InlineQueryResultTypeVideo InlineQueryResultType = "video" InlineQueryResultTypeAudio InlineQueryResultType = "audio" InlineQueryResultTypeVoice InlineQueryResultType = "voice" InlineQueryResultTypeDocument InlineQueryResultType = "document" InlineQueryResultTypeLocation InlineQueryResultType = "location" InlineQueryResultTypeVenue InlineQueryResultType = "venue" InlineQueryResultTypeContact InlineQueryResultType = "contact" InlineQueryResultTypeGame InlineQueryResultType = "game" InlineQueryResultTypeSticker InlineQueryResultType = "sticker" )
type InlineQueryResultVenue ¶
type InlineQueryResultVenue struct { IDAndTypeSource InputMessageContentSource ReplyMarkupSource Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` TitleSource Address string `json:"address"` FoursquareID string `json:"foursquare_id"` FoursquareType string `json:"foursquare_type"` ThumbUrl string `json:"thumb_url"` ThumbWidth int `json:"thumb_width"` ThumbHeight int `json:"thumb_height"` }
type InlineQueryResultVideo ¶
type InlineQueryResultVideo struct { IDAndTypeSource InputMessageContentSource ReplyMarkupSource VideoUrl string `json:"video_url"` MimeType string `json:"mime_type"` ThumbUrl string `json:"thumb_url"` TitleSource CaptionSource ParseModeSource VideoWidth int `json:"video_width"` VideoHeight int `json:"video_height"` VideoDuration int `json:"video_duration"` DescriptionSource }
type InlineQueryResultVoice ¶
type InlineQueryResultVoice struct { IDAndTypeSource InputMessageContentSource ReplyMarkupSource VoiceUrl string `json:"voice_url"` TitleSource CaptionSource ParseModeSource VoiceDuration int `json:"voice_duration"` }
type InputMessageContentSource ¶
type InputMessageContentSource struct {
InputMessageContent interface{} `json:"input_message_content"`
}
type InputTextMessageContent ¶
type InputTextMessageContent struct { MessageText string `json:"message_text"` ParseModeSource DisableWebPagePreview bool `json:"disable_web_page_preview"` }
type KeyboardButton ¶
type LocationSender ¶
type LocationSender interface {
SendLocation(SendLocationRequest) (*Message, error)
}
type MaskPosition ¶
type MediaGroupSender ¶
type MediaGroupSender interface {
SendMediaGroup(SendMediaGroupRequest) (*Message, error)
}
type Message ¶
type Message struct { MessageID int `json:"message_id"` From *User `json:"from"` Date int `json:"date"` Chat *Chat `json:"chat"` ForwardFrom *User `json:"forward_from"` ForwardFromChat *Chat `json:"forward_from_chat"` ForwardFromMessageID int `json:"forward_from_message_id"` ForwardSignature string `json:"forward_signature"` ForwardSenderName string `json:"forward_sender_name"` ForwardDate int `json:"forward_date"` ReplyToMessage *Message `json:"reply_to_message"` EditDate int `json:"edit_date"` MediaGroupID string `json:"media_group_id"` AuthorSignature string `json:"author_signature"` Text string `json:"text"` Entities []MessageEntity `json:"entities"` CaptionEntities []MessageEntity `json:"caption_entities"` Audio *Audio `json:"audio"` Document *Document `json:"document"` Animation *Animation `json:"animation"` Game *Game `json:"game"` Photo []PhotoSize `json:"photo"` Sticker *Sticker `json:"sticker"` Video *Video `json:"video"` Voice *Voice `json:"voice"` VideoNote *VideoNote `json:"video_note"` Caption string `json:"caption"` Contact *Contact `json:"contact"` Location *Location `json:"location"` Venue *Venue `json:"venue"` Poll *Poll `json:"poll"` NewChatMembers []User `json:"new_chat_members"` LeftChatMember *User `json:"left_chat_member"` NewChatTitle string `json:"new_chat_title"` NewChatPhoto *PhotoSize `json:"new_chat_photo"` DeleteChatPhoto bool `json:"delete_chat_photo"` GroupChatCreated bool `json:"group_chat_created"` SupergroupChatCreated bool `json:"supergroup_chat_created"` ChannelChatCreated bool `json:"channel_chat_created"` MigrateToChatID int `json:"migrate_to_chat_id"` MigrateFromChatID int `json:"migrate_from_chat_id"` PinnedMessage *Message `json:"pinned_message"` Invoice *Invoice `json:"invoice"` SuccessfulPayment *SuccessfulPayment `json:"successful_payment"` ConnectedWebsite string `json:"connected_website"` PassportData *PassportData `json:"passport_data"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup"` }
type MessageDeleter ¶
type MessageDeleter interface {
DeleteMessage(DeleteMessageRequest) (bool, error)
}
type MessageEntity ¶
type MessageEntity struct { Type EntityType `json:"type"` Offset int `json:"offset"` Length int `json:"length"` Url string `json:"url"` User *User `json:"user"` }
type MessageForwarder ¶
type MessageForwarder interface {
ForwardMessage(ForwardMessageRequest) (*Message, error)
}
type MessageReplyMarkupEditor ¶
type MessageReplyMarkupEditor interface {
EditMessageReplyMarkup(EditMessageReplyMarkupRequest) (*Message, error)
}
type MessageSender ¶
type MessageSender interface {
SendMessage(SendMessageRequest) (*Message, error)
}
type MessageTextEditor ¶
type MessageTextEditor interface {
EditMessageText(EditMessageTextRequest) (*Message, error)
}
type OrderInfo ¶
type OrderInfo struct { Name string `json:"name"` PhoneNumber string `json:"phone_number"` Email string `json:"email"` ShippingAddress *ShippingAddress `json:"shipping_address"` }
type ParseModeSource ¶
type ParseModeSource struct {
ParseMode ParseMode `json:"parse_mode,omitempty"`
}
func (ParseModeSource) FillFormData ¶
type PassportData ¶
type PassportData struct { Data []EncryptedPassportElement `json:"data"` Credentials EncryptedCredentials `json:"credentials"` }
type PassportFile ¶
type PhotoSender ¶
type PhotoSender interface {
SendPhoto(SendPhotoRequest) (*Message, error)
}
type PinChatMessageRequest ¶
type PinChatMessageRequest struct { ChatRequest MessageID int `json:"message_id"` DisableNotifications bool `json:"disable_notifications"` }
type Poll ¶
type Poll struct { ID string `json:"id"` Question string `json:"question"` Options []PollOption `json:"options"` IsClosed bool `json:"is_closed"` }
type PollOption ¶
type PollSender ¶
type PollSender interface {
SendPoll(SendPollRequest) (*Message, error)
}
type PreCheckoutQuery ¶
type ReplyKeyboardMarkup ¶
type ReplyKeyboardMarkup struct { Keyboard [][]KeyboardButton `json:"keyboard"` ResizeKeyboard bool `json:"resize_keyboard,omitempty"` OneTimeKeyboard bool `json:"one_time_keyboard,omitempty"` Selective bool `json:"selective,omitempty"` }
type ReplyKeyboardRemove ¶
type ReplyMarkupSource ¶
type ReplyMarkupSource struct {
ReplyMarkup interface{} `json:"reply_markup,omitempty"`
}
type ReplyToMessageIDSource ¶
type ReplyToMessageIDSource struct {
ReplyToMessageID int `json:"reply_to_message_id,omitempty"`
}
type ResponseParameters ¶
type ResponseWrapper ¶
type ResponseWrapper struct { Ok bool `json:"ok"` ErrorCode int `json:"error_code"` Parameters ResponseParameters `json:"parameters"` Description string `json:"description"` Result interface{} `json:"result"` }
type SendAnimationRequest ¶
type SendAnimationRequest struct { Animation string `json:"animation"` Duration int `json:"duration"` Width int `json:"width"` Height int `json:"height"` ChatRequest ThumbSource CaptionSource ParseModeSource DisableNotificationsSource ReplyToMessageIDSource ReplyMarkupSource }
type SendAudioRequest ¶
type SendAudioRequest struct { Audio string `json:"audio"` Duration int `json:"duration"` Performer string `json:"performer"` Title string `json:"title"` ChatRequest ThumbSource CaptionSource ParseModeSource DisableNotificationsSource ReplyToMessageIDSource ReplyMarkupSource }
type SendChatActionRequest ¶
type SendChatActionRequest struct { ChatRequest Action ChatAction `json:"action"` }
type SendContactRequest ¶
type SendContactRequest struct { ChatRequest PhoneNumber string `json:"phone_number"` FirstName string `json:"first_name"` LastName string `json:"last_name"` VCard string `json:"v_card"` DisableNotificationsSource ReplyToMessageIDSource ReplyMarkupSource }
type SendDocumentRequest ¶
type SendDocumentRequest struct { Document string `json:"document"` ChatRequest ThumbSource CaptionSource ParseModeSource DisableNotificationsSource ReplyToMessageIDSource ReplyMarkupSource }
type SendLocationRequest ¶
type SendLocationRequest struct { ChatRequest Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` LivePeriod int `json:"live_period"` DisableNotificationsSource ReplyToMessageIDSource ReplyMarkupSource }
type SendMediaGroupRequest ¶
type SendMediaGroupRequest struct { ChatRequest Media []interface{} `json:"media"` DisableNotificationsSource ReplyToMessageIDSource }
type SendMessageRequest ¶
type SendMessageRequest struct { ChatRequest Text string `json:"text"` DisableWebPagePreview bool `json:"disable_web_page_preview,omitempty"` ParseModeSource DisableNotificationsSource ReplyToMessageIDSource ReplyMarkupSource }
type SendPhotoRequest ¶
type SendPhotoRequest struct { Photo string `json:"photo"` ChatRequest CaptionSource ParseModeSource DisableNotificationsSource ReplyToMessageIDSource ReplyMarkupSource }
type SendPollRequest ¶
type SendPollRequest struct { ChatRequest Question string `json:"question"` Options []string `json:"options"` DisableNotificationsSource ReplyToMessageIDSource ReplyMarkupSource }
type SendVideoNoteRequest ¶
type SendVideoNoteRequest struct { ChatRequest VideoNote string `json:"video_note"` Duration int `json:"duration"` Length int `json:"length"` ThumbSource DisableNotificationsSource ReplyToMessageIDSource ReplyMarkupSource }
type SendVideoRequest ¶
type SendVideoRequest struct { Video string `json:"video"` Duration int `json:"duration"` Width int `json:"width"` Height int `json:"height"` SupportsStreaming bool `json:"supports_streaming"` ChatRequest ThumbSource CaptionSource ParseModeSource DisableNotificationsSource ReplyToMessageIDSource ReplyMarkupSource }
type SendVoiceRequest ¶
type SendVoiceRequest struct { Voice string `json:"voice"` Duration int `json:"duration"` ChatRequest CaptionSource ParseModeSource DisableNotificationsSource ReplyToMessageIDSource ReplyMarkupSource }
type SetChatDescriptionRequest ¶
type SetChatDescriptionRequest struct { ChatRequest Description string `json:"description"` }
type SetChatPhotoRequest ¶
type SetChatPhotoRequest struct { ChatRequest Photo string `json:"photo"` }
func (SetChatPhotoRequest) FillFormData ¶
type SetChatStickerSetRequest ¶
type SetChatStickerSetRequest struct { ChatRequest StickerSetName string `json:"sticker_set_name"` }
type SetChatTitleRequest ¶
type SetChatTitleRequest struct { ChatRequest Title string `json:"title"` }
type ShippingAddress ¶
type ShippingQuery ¶
type ShippingQuery struct { ID string `json:"id"` From *User `json:"from"` InvoicePayload string `json:"invoice_payload"` ShippingAddress *ShippingAddress `json:"shipping_address"` }
type Sticker ¶
type Sticker struct { FileID string `json:"file_id"` Width int `json:"width"` Height int `json:"height"` IsAnimated bool `json:"is_animated"` Thumb *PhotoSize `json:"thumb"` Emoji string `json:"emoji"` SetName *string `json:"set_name"` MaskPosition *MaskPosition `json:"mask_position"` FileSize int `json:"file_size"` }
type SuccessfulPayment ¶
type SuccessfulPayment struct { Currency string `json:"currency"` TotalAmount int `json:"total_amount"` InvoicePayload string `json:"invoice_payload"` ShippingOptionID string `json:"shipping_option_id"` OrderInfo *OrderInfo `json:"order_info"` TelegramPaymentChargeID string `json:"telegram_payment_charge_id"` ProviderPaymentChargeID string `json:"provider_payment_charge_id"` }
type ThumbSource ¶
type ThumbSource struct {
Thumb string `json:"thumb,omitempty"`
}
type TitleSource ¶
type TitleSource struct {
Title string `json:"title"`
}
type Update ¶
type Update struct { UpdateID int `json:"update_id"` Message *Message `json:"message"` EditedMessage *Message `json:"edited_message"` ChannelPost *Message `json:"channel_post"` EditedChannelPost *Message `json:"edited_channel_post"` InlineQuery *InlineQuery `json:"inline_query"` ChosenInlineResult *ChosenInlineResult `json:"chosen_inline_result"` CallbackQuery *CallbackQuery `json:"callback_query"` ShippingQuery *ShippingQuery `json:"shipping_query"` PreCheckoutQuery *PreCheckoutQuery `json:"pre_checkout_query"` Poll *Poll `json:"poll"` }
type UpdateType ¶
type UpdateType string
const ( UpdateTypeMessage UpdateType = "message" UpdateTypeEditedMessage UpdateType = "edited_message" UpdateTypeChannelPost UpdateType = "channel_post" UpdateTypeEditedChannelPost UpdateType = "edited_channel_post" UpdateTypeInlineResult UpdateType = "inline_query" UpdateTypeChosenInlineResult UpdateType = "chosen_inline_result" UpdateTypeCallbackQuery UpdateType = "callback_query" UpdateTypeShippingQuery UpdateType = "shipping_query" UpdateTypePreCheckoutQuery UpdateType = "pre_checkout_query" UpdateTypePoll UpdateType = "poll" )
type UpdatesGetter ¶
type UpdatesGetter interface {
GetUpdates(GetUpdatesRequest) (*[]Update, error)
}
type UserProfilePhotos ¶
type VideoNoteSender ¶
type VideoNoteSender interface {
SendVideoNote(SendVideoNoteRequest) (*Message, error)
}
type VideoSender ¶
type VideoSender interface {
SendVideo(SendVideoRequest) (*Message, error)
}
type VoiceSender ¶
type VoiceSender interface {
SendVoice(SendVoiceRequest) (*Message, error)
}
Click to show internal directories.
Click to hide internal directories.