notification

package
v0.57.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTelegramService

func NewTelegramService(token string, chatID int64) (*telegramService, error)

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 TelegramSender interface {
	Send(c tgbotapi.Chattable) (tgbotapi.Message, error)
}

type TelegramService

type TelegramService interface {
	Send(context.Context, string, ...MessageOption) error
}

Jump to

Keyboard shortcuts

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