Documentation
¶
Index ¶
- Variables
- func NewWebhookDriver(gaSettings AnalyticsSettings, botHost botsfw.BotHost, panicTextFooter string) botsfw.WebhookDriver
- func NewWebhookRouter(errorFooterText func(ctx context.Context, botContext ErrorFooterArgs) string) botsfw.Router
- type AnalyticsSettings
- type CommandsRegisterer
- type ErrorFooterArgs
- type ErrorFooterTextFunc
- type RegisterCommandsForInputTypeFunc
- type RegisterCommandsFunc
- type TypeCommands
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoCommandsMatched = errors.New("no commands matched")
View Source
var ErrorIcon = "🚨"
ErrorIcon is used to report errors to user
Functions ¶
func NewWebhookDriver ¶ added in v0.62.0
func NewWebhookDriver(gaSettings AnalyticsSettings, botHost botsfw.BotHost, panicTextFooter string) botsfw.WebhookDriver
NewWebhookDriver registers new bot driver (TODO: describe why we need it)
func NewWebhookRouter ¶ added in v0.66.0
func NewWebhookRouter(errorFooterText func(ctx context.Context, botContext ErrorFooterArgs) string) botsfw.Router
NewWebhookRouter creates new router
Types ¶
type AnalyticsSettings ¶
type AnalyticsSettings struct { GaTrackingID string // TODO: Refactor to list of analytics providers Enabled func(r *http.Request) bool }
AnalyticsSettings keeps data for Google Analytics
type CommandsRegisterer ¶ added in v0.66.0
type ErrorFooterArgs ¶ added in v0.66.0
type ErrorFooterArgs struct {}
type ErrorFooterTextFunc ¶ added in v0.66.0
type ErrorFooterTextFunc func(ctx context.Context, botContext ErrorFooterArgs) string
type RegisterCommandsForInputTypeFunc ¶ added in v0.66.0
type RegisterCommandsFunc ¶ added in v0.66.0
type TypeCommands ¶ added in v0.66.0
type TypeCommands struct {
// contains filtered or unexported fields
}
TypeCommands container for commands
Click to show internal directories.
Click to hide internal directories.