web

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: MIT Imports: 18 Imported by: 0

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)

func (*Server) Start

func (s *Server) Start(ctx context.Context) 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.

Jump to

Keyboard shortcuts

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