telegram

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2025 License: Apache-2.0 Imports: 12 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

This section is empty.

Variables

This section is empty.

Functions

func LogUser

func LogUser(u *models.User) slog.Value

LogUser returns a slog.Value for models.User for structured logging

Types

type Feeder added in v0.1.0

type Feeder = services.Feeder

type Handlers

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

func NewHandlers

func NewHandlers(cfg config.Settings, log *slog.Logger, out chan<- entities.Request, f Feeder) *Handlers

func (*Handlers) CmdBuild

func (h *Handlers) CmdBuild() bot.HandlerFunc

CmdBuild handles the /build command to manually trigger RSS feed rebuild.

func (*Handlers) CmdInfo added in v0.1.0

func (h *Handlers) CmdInfo() bot.HandlerFunc

CmdInfo handles the /info command to provide information about the podcast feed

func (*Handlers) CmdStart

func (h *Handlers) CmdStart() bot.HandlerFunc

CmdStart handles the /start command.

func (*Handlers) Error

func (h *Handlers) Error() bot.ErrorsHandler

func (*Handlers) Url

func (h *Handlers) Url() bot.HandlerFunc

type Middleware

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

Middleware represents a Telegram bot middleware.

func NewMiddleware

func NewMiddleware(cfg config.Telegram, log *slog.Logger) *Middleware

NewMiddleware creates a new Middleware instance.

func (*Middleware) WithAllowedUsers

func (m *Middleware) WithAllowedUsers() bot.Middleware

WithAllowedUsers is a middleware that blocks updates from users not in the allowed users list.

type Notifications

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

Notifications handles sending notifications to users about process updates.

func NewNotifications

func NewNotifications(log *slog.Logger, bot *bot.Bot, in <-chan entities.Process) *Notifications

NewNotifications creates a new Notifications instance.

func (*Notifications) Start

func (n *Notifications) Start(ctx context.Context)

Start begins listening for process updates and sending notifications.

Jump to

Keyboard shortcuts

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