Documentation
¶
Index ¶
Constants ¶
View Source
const PlatformID = "telegram"
Variables ¶
This section is empty.
Functions ¶
func NewPlatform ¶
func NewPlatform(cfg config.TelegramConfig, mediaSvc *media.Service, migrator SessionKeyMigrator) platform.Platform
Types ¶
type AuthStore ¶ added in v0.0.7
type AuthStore struct {
// contains filtered or unexported fields
}
AuthStore manages authorized Telegram user IDs with file-backed persistence.
func (*AuthStore) Authorize ¶ added in v0.0.7
Authorize adds a user ID to the authorized list and persists to disk.
func (*AuthStore) IsAuthorized ¶ added in v0.0.7
IsAuthorized checks if a user ID is in the authorized list.
type SessionKeyMigrator ¶ added in v0.0.46
type TelegramPlatform ¶
type TelegramPlatform struct {
// contains filtered or unexported fields
}
func (*TelegramPlatform) ID ¶
func (p *TelegramPlatform) ID() string
func (*TelegramPlatform) Receiver ¶
func (p *TelegramPlatform) Receiver() platform.PlatformReceiverAdapter
func (*TelegramPlatform) Sender ¶
func (p *TelegramPlatform) Sender() platform.PlatformSenderAdapter
type TelegramReceiver ¶
type TelegramReceiver struct {
// contains filtered or unexported fields
}
func (*TelegramReceiver) Start ¶
func (r *TelegramReceiver) Start(ctx context.Context, dispatch func(platform.InboundMessage)) error
type TelegramSender ¶
type TelegramSender struct {
// contains filtered or unexported fields
}
func (*TelegramSender) Send ¶
func (s *TelegramSender) Send(ctx context.Context, msg platform.OutboundMessage) error
Click to show internal directories.
Click to hide internal directories.