Documentation
¶
Overview ¶
Package config loads bootstrap configuration from environment variables. Everything else (per-user data, channels) lives in the database.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
DBPath string // SQLite file path
HTTPAddr string // public API bind address (put behind Cloudflare / reverse proxy + TLS)
// Basic per-user rate limit for /api/sms (requests per minute).
RateLimitPerMin int
// Shared Telegram bot. When BotToken is empty, the Telegram channel is
// disabled (bot doesn't start, bind-code endpoint returns 501).
// These are env fallbacks; the admin console can override them in the DB.
BotToken string
BotUsername string // without leading @, used to build t.me deep links
// Global broadcast target: a Telegram channel/group chat id. When non-zero,
// every received SMS is also published there, in addition to per-user
// delivery. DB setting "publish_chat_id" overrides this env fallback.
PublishChatID int64
// Admin console. Disabled when AdminUser/AdminPassword are empty.
AdminAddr string // bind address; keep on localhost unless fronted by TLS
AdminUser string
AdminPassword string
}
Click to show internal directories.
Click to hide internal directories.