package
0.40.2
Repository: https://github.com/bots-go-framework/bots-fw.git
Documentation: pkg.go.dev

# Functions

CommandTextNoTrans returns a title for a command (pre-translated).
NewBotContext creates current bot host & settings.
No description provided by the author
No description provided by the author
NewBotSettings configures bot application.
NewBotSettingsBy create settings per different keys (ID, code, API token, Locale).
NewCallbackCommand create a definition of a callback command goland:noinspection GoUnusedExportedFunction.
No description provided by the author
goland:noinspection GoUnusedExportedFunction.
NewWebhookContextBase creates base bot context.
NewWebhookRouter creates new router goland:noinspection GoUnusedExportedFunction.
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.
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 botChat.
BotMessageTypeText sends text reply.
BotMessageTypeUndefined unknown type.
.
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.

# Variables

TODO: Consider adding this to init interface of setting config values.
TODO: Consider adding this to init interface of setting config values.
ErrEntityNotFound is returned if entity not found in storage.
No description provided by the author
ErrNotImplemented if some feature is not implemented yet.
No description provided by the author
IgnoreCommand is a command that does nothing.

# Structs

BotContext binds a bot to a specific hosting environment.
BotSettings keeps parameters of a bot that are static and are not changed in runtime.
SettingsBy keeps settings per different keys (ID, code, API token, Locale) TODO: Decide if it should have map[string]*BotSettings instead of map[string]BotSettings.
Command defines command metadata and action.
No description provided by the author
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 goland:noinspection GoDeprecation.
OnMessageSentResponse represents response on message sent event.
TextMessageFromBot is a text output message from bot to user.
TypeCommands container for commands.
WebhookContextBase provides base implementation of WebhookContext interface TODO: Document purpose of a dedicated base struct (e.g.
WebhookHandlerBase provides base implementation for a bot handler.
WebhookNewContext TODO: needs to be checked & described.
WebhooksRouter maps routes to commands.

# Interfaces

AppContext is a context for an app that uses the botsfw.
Attachment to a bot message.
BotContextProvider provides BotContext by platformID & botID.
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.
No description provided by the author
No description provided by the author
BotState provides state of the bot (TODO: document how is used).
ChatUID returns botChat ID as unique string.
ExecutionContext TODO: either specify clear purpose and added value or remove.
GaContext provides context to Google Analytics - TODO: we should have an abstraction for analytics.
GaQueuer queues messages for sending to Google Analytics.
No description provided by the author
InputMessage represents single input message.
MessageUID is unique message ID as string.
MessengerResponse represents response from a messenger.
WebhookContext provides context for current request from user to bot.
WebhookDriver is doing initial request & final response processing.
WebhookHandler handles requests from a specific bot API This is implemented by different botsfw packages, e.g.
WebhookInlineQueryContext provides context for inline query (TODO: check & document).
WebhookResponder is an API provider to send messages through a messenger.

# Type aliases

No description provided by the author
AttachmentType to a bot message.
BotAPISendMessageChannel specifies messenger channel.
BotMessageType defines type of an output message from bot to user.
SettingsProvider returns settings per different keys (ID, code, API token, Locale).
No description provided by the author
CallbackAction defines a callback action bot can perform in response to a callback command.
ChatIntID returns botChat 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.
No description provided by the author
ErrAuthFailed raised if authentication failed.
MessageFormat specify formatting of a text message to BOT (e.g.
TranslatorProvider translates texts.