Documentation
¶
Overview ¶
Package handler holds the Hertz handler of the Telegram bot webhook.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterTelegramHandlers ¶
func RegisterTelegramHandlers(router *server.Hertz, service notification.Service, botToken func() string)
RegisterTelegramHandlers registers the Telegram bot webhook; botToken reads the current bot token, which the webhook secret derives from.
func TelegramHandler ¶
func TelegramHandler(service WebhookUpdates, botToken func() string) app.HandlerFunc
TelegramHandler documents Telegram.
@Summary Telegram @Tags common @Accept json @Produce json @Security TelegramSecret @Param request body object true "Telegram Bot API update" @Success 200 {object} httpx.ResponseSuccessBean @Router /v1/telegram/webhook [post]
Types ¶
Click to show internal directories.
Click to hide internal directories.