web

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssetsFS

func AssetsFS() (fs.FS, string)

func TemplatesFS

func TemplatesFS() (fs.FS, error)

TemplatesFS returns the embedded templates filesystem.

Types

type Deps

type Deps struct {
	Store    *store.Store
	AuthMW   *auth.Middleware
	LoginRL  *auth.LoginRateLimiter
	Hub      *ws.Hub
	Telegram TelegramConfigurator
	AssetsFS fs.FS
	Version  string
}

type Handler

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

func NewHandler

func NewHandler(deps Deps) *Handler

func (*Handler) Mount

func (h *Handler) Mount(mux *http.ServeMux)

type TelegramConfigurator

type TelegramConfigurator interface {
	ConfigureTelegram(ctx context.Context, userID, botToken, allowedUserIDs string) (string, error)
	ClearTelegram(ctx context.Context, userID string) error
	TestTelegram(ctx context.Context, userID, chatID string) error
}

TelegramConfigurator lets the browser /account page configure Telegram using the same validated/encrypted/poller-managed path as the JSON API.

Jump to

Keyboard shortcuts

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