telegram

package
v0.0.46 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 22 Imported by: 0 modules, 0 packages

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

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

func (s *AuthStore) Authorize(userID string)

Authorize adds a user ID to the authorized list and persists to disk.

func (*AuthStore) IsAuthorized added in v0.0.7

func (s *AuthStore) IsAuthorized(userID string) bool

IsAuthorized checks if a user ID is in the authorized list.

type SessionKeyMigrator added in v0.0.46

type SessionKeyMigrator interface {
	MigrateSessionKeyPrefix(ctx context.Context, from, to string) (int64, error)
}

type TelegramPlatform

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

func (*TelegramPlatform) ID

func (p *TelegramPlatform) ID() string

func (*TelegramPlatform) Receiver

func (*TelegramPlatform) Sender

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

Jump to

Keyboard shortcuts

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