Documentation
¶
Index ¶
- func GetBotInputTypeIdNameString(whInputType Type) string
- type Actor
- type Attachment
- type AudioMessage
- type CallbackQuery
- type Chat
- type ChosenInlineResult
- type ContactMessage
- type ConversationStarted
- type Delivery
- type Entry
- type EntryInput
- type EntryInputs
- type InlineQuery
- type InputMessage
- type LeftChatMembersMessage
- type LocationMessage
- type Message
- type NewChatMembersMessage
- type OrderInfo
- type PhotoMessage
- type PhotoMessageItem
- type Postback
- type PreCheckoutQuery
- type Recipient
- type ReferralMessage
- type RefundedPayment
- type Sender
- type SharedUserMessageItem
- type SharedUsersMessage
- type ShippingAddress
- type StickerMessage
- type Subscribed
- type SuccessfulPayment
- type TextMessage
- type Type
- type Unsubscribed
- type User
- type VoiceMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBotInputTypeIdNameString ¶ added in v0.66.0
Types ¶
type Actor ¶ added in v0.66.0
type Actor interface {
Platform() string // TODO: Consider removing this?
GetID() any
IsBotUser() bool
GetFirstName() string
GetLastName() string
GetUserName() string
GetLanguage() string
}
Actor represents sender
type Attachment ¶ added in v0.67.0
type Attachment interface {
Type() string // Enum(image, video, audio) for Facebook
PayloadUrl() string // 'payload.url' for Facebook
}
Attachment represents attachment to a message
type AudioMessage ¶ added in v0.66.0
type AudioMessage interface {
Message
}
AudioMessage represents a single audio message
type CallbackQuery ¶ added in v0.66.0
type CallbackQuery interface {
GetID() string
//GetInlineMessageID() string // Telegram only?
//GetChatInstanceID() string // Telegram only?
GetFrom() Sender
GetMessage() Message
GetData() string
Chat() Chat
}
CallbackQuery represents a single callback query message
type ChosenInlineResult ¶ added in v0.66.0
type ChosenInlineResult interface {
GetResultID() string
GetInlineMessageID() string // Telegram only?
GetFrom() Sender
GetQuery() string
}
ChosenInlineResult represents a single report message on chosen inline result
type ContactMessage ¶ added in v0.66.0
type ContactMessage interface {
GetPhoneNumber() string
GetFirstName() string
GetLastName() string
GetBotUserID() string
GetVCard() string
}
ContactMessage represents a single contact message
type ConversationStarted ¶ added in v0.66.0
type ConversationStarted interface {
ConversationStartedMessage() any
}
ConversationStarted represents a single message about new conversation
type Delivery ¶ added in v0.66.0
type Delivery interface {
Payload() string
}
Delivery represents a single delivery report message
type EntryInput ¶ added in v0.66.0
type EntryInput struct {
Entry Entry
Input InputMessage
}
EntryInput provides information on parsed input from bot API request
type EntryInputs ¶ added in v0.66.0
type EntryInputs struct {
Entry Entry
Inputs []InputMessage
}
EntryInputs provides information on parsed inputs from bot API request
type InlineQuery ¶ added in v0.66.0
type InlineQuery interface {
GetID() any
GetInlineQueryID() string
GetFrom() Sender
GetQuery() string
GetOffset() string
}
InlineQuery represents a single inline message
type InputMessage ¶ added in v0.66.0
type InputMessage interface {
GetSender() User
GetRecipient() Recipient
GetTime() time.Time
InputType() Type
MessageIntID() int
MessageStringID() string
BotChatID() (string, error)
Chat() Chat
LogRequest() // TODO: should not be part of Input? If should - specify why
}
InputMessage represent a single message '/entry/messaging' for Facebook Messenger
type LeftChatMembersMessage ¶ added in v0.66.0
LeftChatMembersMessage represents a single message about a member leaving a botChat
type LocationMessage ¶ added in v0.70.2
LocationMessage represents a location with geo point sent by user
type Message ¶ added in v0.66.0
type Message interface {
InputMessage
Chat() Chat
}
Message represents a single input message
type NewChatMembersMessage ¶ added in v0.66.0
NewChatMembersMessage represents a single message about a new member of a botChat
type OrderInfo ¶ added in v0.62.0
type OrderInfo interface {
GetUserName() string //
GetPhoneNumber() string
GetEmailAddress() string
GetShippingAddress() ShippingAddress
}
type PhotoMessage ¶ added in v0.66.0
type PhotoMessage interface {
Message
}
PhotoMessage represents a single photo message
type PhotoMessageItem ¶ added in v0.41.0
type PreCheckoutQuery ¶ added in v0.67.0
type ReferralMessage ¶ added in v0.66.0
ReferralMessage represents a single referral message https://developers.facebook.com/docs/messenger-platform/webhook-reference/referral
type RefundedPayment ¶ added in v0.67.0
type RefundedPayment interface {
// contains filtered or unexported methods
}
type SharedUserMessageItem ¶ added in v0.41.0
type SharedUserMessageItem interface {
}
type SharedUsersMessage ¶ added in v0.67.0
type SharedUsersMessage interface {
Message
}
SharedUsersMessage represents a message with information about shared user
type ShippingAddress ¶ added in v0.62.0
type StickerMessage ¶ added in v0.66.0
type StickerMessage interface {
Message
}
StickerMessage represents single sticker message
type Subscribed ¶ added in v0.66.0
type Subscribed interface {
SubscribedMessage() any
}
Subscribed represents a subscription message
type SuccessfulPayment ¶ added in v0.66.0
type TextMessage ¶ added in v0.66.0
TextMessage represents a single text message
type Type ¶ added in v0.66.0
type Type int
Type is enum of input type
const ( // TypeUnknown is an unknown input type TypeUnknown Type = iota // TypeNotImplemented is not implemented input type TypeNotImplemented // TypeText is a text input type TypeText // Facebook, Telegram, Viber TypeEditText // Facebook, Telegram, Viber // TypeVoice is voice input type TypeVoice // TypePhoto is a photo input type TypePhoto // TypeAudio is an audio input type TypeAudio // TypeContact is a contact input type TypeContact // Facebook, Telegram, Viber // TypePostback is unknown input type TypePostback // TypeDelivery is a postback input type TypeDelivery // TypeAttachment is a delivery report input type TypeAttachment // TypeInlineQuery is an attachment input type TypeInlineQuery // Telegram // TypeCallbackQuery is inline input type TypeCallbackQuery TypeLocation // TypeReferral is a callback input type TypeReferral // FBM // TypeChosenInlineResult is chosen inline result input type TypeChosenInlineResult // Telegram // TypeSubscribed is subscribed input type TypeSubscribed // Viber // TypeUnsubscribed is unsubscribed input type TypeUnsubscribed // Viber // TypeConversationStarted is conversation started input type TypeConversationStarted // Viber // TypeNewChatMembers is new botChat members input type TypeNewChatMembers // Telegram groups // TypeLeftChatMembers is left botChat members input type TypeLeftChatMembers // TypeSticker is a sticker input type TypeSticker TypePreCheckoutQuery TypeSuccessfulPayment TypeRefundedPayment )
type Unsubscribed ¶ added in v0.66.0
type Unsubscribed interface {
UnsubscribedMessage() any
}
Unsubscribed represents a message when user unsubscribe
type User ¶ added in v0.66.0
type User interface {
Sender
// GetCountry is an extension to support language & country (Viber)
GetCountry() string
}
User represents sender with country
type VoiceMessage ¶ added in v0.66.0
type VoiceMessage interface {
Message
}
VoiceMessage represents a single voice message