Documentation
¶
Index ¶
Constants ¶
View Source
const ( EnvDevelopment = "development" EnvTest = "test" EnvProduction = "production" )
Environment constants (public)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Domain string // Base domain (e.g. "example.com")
Port string // HTTP server port
DBDir string // Directory for the SQLite database file
AttachmentsDir string // Directory for attachment file storage
URL string // API base URL (https://api.{domain})
SiteURL string // Site base URL (https://{domain})
PrivateBeta bool // Enable private beta mode
BootstrapAdminEmail string // Optional bootstrap admin identity promoted after OTP verification
Env string // Environment (dev, staging, prod)
ProxySubnet netip.Prefix // CIDR of the trusted reverse proxy (zero value = no proxy)
IPHashSalt string // Secret salt for hashing client IPs (required in production)
VAPIDPublicKey string // VAPID public key used for Web Push
VAPIDPrivateKey string // VAPID private key used for Web Push
CookieDomain string // Domain attribute for session cookies (e.g. ".example.com")
AllowedOrigins []string // CORS allowed origins
Mailer *Mailer // Mailer configuration
VAPIDSubject string // VAPID subject (https://{domain}) per RFC 8292
RequestIDHeader string // HTTP header name for request ID propagation (default: X-Request-ID)
HiveURL string // Base URL of the Hive PWA (https://hive.{domain})
PushURL string // Base URL of the push endpoint (https://push.{domain})
HookURL string // Base URL of the webhook endpoint (https://hook.{domain})
SentryDSN string // Sentry/GlitchTip DSN (empty = disabled)
}
Config holds the application configuration loaded from environment variables.
type Mailer ¶
type Mailer struct {
SMTPAddress string // SMTP server address (host:port)
SMTPUser string // SMTP username
SMTPPassword string // SMTP password
ResendAPIKey string // Resend API key
Sender string // Email sender address
ReplyTo string // Reply-To address
SiteURL string // Site base URL for email links
}
Mailer holds mailer configuration.
Click to show internal directories.
Click to hide internal directories.