package
0.0.0-20180716155028-89493d822eb1
Repository: https://github.com/primeteller/bots-framework.git
Documentation: pkg.go.dev

# Functions

AwaitingReplyToPath returns just path part of command state.
AwaitingReplyToQuery returns just query part of command state.
CommandTextNoTrans returns a title for a command (pre-translated).
NewBotContext creates current bot host & settings.
NewBotDriver registers new bot driver (TODO: describe why we need it).
NewBotSettings configures bot application.
NewBotSettingsBy create settings per different keys (ID, code, API token, locale).
NewCallbackCommand create a definition of a callback command.
NewChatID create a new bot chat ID, returns string.
No description provided by the author
NewWebhookContextBase creates base bot context.
NewWebhookRouter creates new router.
NotFoundHandler returns HTTP status code 404.
PingHandler returns 'Pong' back to user.
SetAccessGranted marks current context as authenticated.

# Constants

AttachmentTypeAudio is for audio attachments.
AttachmentTypeFile is for file attachments.
AttachmentTypeImage is for image attachments.
AttachmentTypeNone says there is no attachment.
AttachmentTypeVideo is for video attachments.
AwaitingReplyToParamsSeparator separates params of command state.
AwaitingReplyToPath2QuerySeparator separates path and query parts of state.
AwaitingReplyToPathSeparator separates parts of the command state.
BotAPISendMessageOverHTTPS indicates message should be sent over HTTPS.
BotAPISendMessageOverResponse indicates message should be sent in HTTP response.
BotMessageTypeCallbackAnswer sends callback answer.
BotMessageTypeEditMessage edit previously sent message.
BotMessageTypeExportChatInviteLink sends invite link.
BotMessageTypeInlineResults sends inline results.
BotMessageTypeLeaveChat commands messenger to kick off bot from a chat.
BotMessageTypeText sends text reply.
BotMessageTypeUndefined unknown type.
.
KeyboardTypeBottom for bottom keyboard.
KeyboardTypeForceReply to force reply from a user.
KeyboardTypeHide commands to hide keyboard.
KeyboardTypeInline for inline keyboard.
KeyboardTypeNone for no keyboard.
MessageFormatHTML is for HTML messages.
MessageFormatMarkdown is for markdown messages.
MessageFormatText is for text messages.
MessageTextBotDidNotUnderstandTheCommand is an i18n constant.
MessageTextOopsSomethingWentWrong is an i18n constant.
NoMessageToSend returned explicitly if we don't want to reply to user intput.
ShortTitle key.
WebhookInputAttachment is delivery report input type.
WebhookInputAudio is audio input type.
WebhookInputCallbackQuery is inline input type.
Telegram.
Facebook, Telegram, Viber.
Viber.
WebhookInputDelivery is postback input type.
Telegram.
WebhookInputLeftChatMembers is left chat members input type.
Telegram groups.
WebhookInputNotImplemented is not implemented input type.
WebhookInputPhoto is photo input type.
WebhookInputPostback is unknown input type.
FBM.
Telegram.
Viber.
Facebook, Telegram, Viber.
WebhookInputUnknown is unknown input type.
Viber.
WebhookInputVoice is voice input type.

# Variables

ErrEntityNotFound is returned if entity not found in storage.
No description provided by the author
ErrNotImplemented if some feature is not implemented yet.
ErrorIcon is used to report errors to user.
IgnoreCommand is a command that does nothing.
WebhookInputTypeNames names for input type.

# Structs

AnalyticsSettings keeps data for Google Analytics.
BaseHandler provides base implemnetation of a bot handler.
BotChatEntity hold common properties for bot chat entities.
botContext describes current bot app host & settings.
BotCoreStores provides DI DAL for updating app persistent store.
BotDriver keeps information about bots and map requests to appropriate handlers.
BotEntity holds properties common to al bot entitites.
BotSettings keeps parameters of a bot.
BotUserEntity hold common properties for bot user entities.
Command defines command metadata and action.
EntryInput provides information on parsed input from bot API request.
EntryInputs provides information on parsed inputs from bot API request.
MessageFromBot keeps all the details of answer from bot to user.
OnMessageSentResponse represents response on message sent event.
SettingsBy keeps settings per different keys (ID, code, API token, locale).
TextMessageFromBot is a text output message from bot to user.
TypeCommands container for commands.
WebhookContextBase provides base implementation of WebhookContext interface.
WebhookNewContext TODO: needs to be checked & described.
WebhooksRouter maps routes to commands.

# Interfaces

Attachment to a bot message.
BotAPIUser provides info about current bot user.
BotAppContext is a context for bot app.
BotAppUser holds information about bot app user.
BotAppUserStore interface for storing user information to persistent store.
BotChat provides data about bot chat.
BotChatStore is interface for DAL to store bot chat data.
BotHost describes current bot app host environment.
BotInputProvider provides an input from a specific bot interface (Telegram, FB Messenger, Viber, etc.).
BotMessage is an output message from bot to user.
BotPlatform describes current bot platform.
BotState provides state of the bot (TODO: document how is used).
BotUser interface provides information about bot user.
BotUserStore provider to store information about bot user.
ChatUID returns chat ID as unique string.
GaContext provides context to Google Analytics.
GaQueuer queues messages for sending to Google Analytics.
InputMessage represents single input message.
Keyboard defines keyboard.
MessageUID is unique message ID as string.
MessengerResponse represents response from a messenger.
WebhookActor represents sender.
WebhookAttachment represents attachment to a message.
WebhookAudioMessage represents single audio message.
WebhookCallbackQuery represents a single callback query message.
WebhookChat represents chat of a messenger.
WebhookChosenInlineResult represents a single report message on chosen inline result.
WebhookContactMessage represents single contact message.
WebhookContext provides context for current request from user to bot.
WebhookConversationStarted represents a single message about new conversation.
WebhookDelivery represents a single delivery report message.
WebhookDriver is doing initial request & final response processing.
WebhookEntry represents a single message from a messenger user.
WebhookHandler handles requests from a specific bot API.
WebhookInlineQuery represents a single inline message.
WebhookInlineQueryContext provides context for inline query (TODO: check & document).
WebhookInput represent a single message.
WebhookLeftChatMembersMessage represents single message about a member leaving a chat.
WebhookMessage represents single message.
WebhookNewChatMembersMessage represents single message about a new member of a chat.
WebhookPhotoMessage represents single photo message.
WebhookPostback represents single postback message.
WebhookRecipient represents receiver.
WebhookReferralMessage represents single referral message.
WebhookResponder is an API provider to send messages through a messenger.
WebhookSender represents sender with avatar.
WebhookStickerMessage represents single sticker message.
WebhookSubscribed represents a subscription message.
WebhookTextMessage represents single text message.
WebhookUnsubscribed represents a message when user unsubscribe.
WebhookUser represents sender with country.
WebhookVoiceMessage represents single voice message.

# Type aliases

AttachmentType to a bot message.
BotAPISendMessageChannel specifies messenger channel.
BotMessageType defines type of an output message from bot to user.
CallbackAction defines a callback action bot can perform in response to a callback command.
ChatIntID returns chat ID as unique integer.
CommandAction defines an action bot can perform in response to a command.
CommandMatcher returns true if action is matched to user input.
ErrAuthFailed raised if authentication failed.
KeyboardType defines keyboard type.
MessageFormat specify formatting of a text message to BOT (e.g.
SettingsProvider returns settings per different keys (ID, code, API token, locale).
TranslatorProvider translates texts.
WebhookInputType is enum of input type.