Documentation
¶
Overview ¶
Package config loads and validates the application configuration from the environment (12-factor). In development a .env file in the working directory is loaded automatically.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Telegram
BotToken string
OwnerTGIDs []int64
// Storage
DBPath string
// Observed sources
BoostyGroupID int64
TributeChannelID int64
// Managed club resources
ClubChatID int64
ClubChannelID int64
AdminLogChatID *int64 // nil when unset
// Operator event feed. A dedicated group where the bot and owner are
// members; carries the human-readable access/membership event log,
// separate from ADMIN_LOG_CHAT_ID ops alerts.
EventLogChatID int64
// Subscribe links
BoostySubscribeURL string
TributeSubscribeURLRub string
TributeSubscribeURLEur string
// Access granting
InviteMode string
InviteTTL time.Duration
AllowDirectInvites bool
AdmissionFallbackMaxAge time.Duration
AdmissionJoinRequestRetries int
// Tribute
TributeMode string
TributeAPIKey string
TributeCancelIsImmediate bool
WebhookListenAddr string
TributeWebhookPath string
// Telegram transport
TelegramMode string
TelegramWebhookPublicURL string
TelegramWebhookPath string
TelegramWebhookSecret string
// Expiry policy
ExpiryMode string
GracePeriod time.Duration
ReconcileInterval time.Duration
CleanupInterval time.Duration
RawRetention time.Duration
AuditRetention time.Duration
EnforcerWorkers int
// Misc
Timezone string
Location *time.Location
LogLevel string
LogFormat string
MetricsEnabled bool
}
Config is the fully parsed and validated application configuration.