botswebhook

package
v0.71.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2025 License: Apache-2.0 Imports: 19 Imported by: 3 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 CommandsRegisterer interface {
	RegisterCommands(commands ...botsfw.Command)
}

type ErrorFooterArgs added in v0.66.0

type ErrorFooterArgs struct {
	BotProfileID string
	BotCode      string
}

type ErrorFooterTextFunc added in v0.66.0

type ErrorFooterTextFunc func(ctx context.Context, botContext ErrorFooterArgs) string

type RegisterCommandsForInputTypeFunc added in v0.66.0

type RegisterCommandsForInputTypeFunc func(inputType botinput.Type, commands ...botsfw.Command)

type RegisterCommandsFunc added in v0.66.0

type RegisterCommandsFunc func(commands ...botsfw.Command)

type TypeCommands added in v0.66.0

type TypeCommands struct {
	// contains filtered or unexported fields
}

TypeCommands container for commands

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL