Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTelegramService ¶
NewTelegramService initializes the real bot API.
func NewTelegramServiceWithClient ¶ added in v0.57.0
func NewTelegramServiceWithClient(client TelegramSender, chatID int64) *telegramService
NewTelegramServiceWithClient allows injecting a custom/mocked client for testing.
Types ¶
type MessageOption ¶
type MessageOption interface {
Apply(*tgbotapi.MessageConfig)
}
func WithButton ¶
func WithButton(text, url string) MessageOption
type TelegramSender ¶ added in v0.57.0
type TelegramService ¶
type TelegramService interface {
Send(context.Context, string, ...MessageOption) error
}
Click to show internal directories.
Click to hide internal directories.