Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot interface {
HandleUpdate(ctx context.Context, update json.RawMessage, remoteAddr string)
API() telegram.BotAPI
}
Bot is an interface that abstracts the bot's functionality needed by the web server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(logger *slog.Logger, cfg *config.Config, factRepo storage.FactRepository, userRepo storage.UserRepository, statsRepo storage.StatsRepository, logRepo storage.LogRepository, topicRepo storage.TopicRepository, msgRepo storage.MessageRepository, factHistoryRepo storage.FactHistoryRepository, bot Bot, rag *rag.Service) (*Server, error)
type UpdateHandler ¶
type UpdateHandler interface {
HandleUpdate(ctx context.Context, update json.RawMessage, remoteAddr string)
API() telegram.BotAPI
}
UpdateHandler defines an interface for handling Telegram updates.
Click to show internal directories.
Click to hide internal directories.