Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// Comma-separated emails that are automatically granted admin role
// on first login. Env-only so an admin can't remove themselves from
// the approver list via the UI.
AdminEmails string `env:"APP_ADMIN_EMAILS" envDefault:"admin@admin.com"`
// Default password used once to seed an admin account when the DB
// has no admin user yet. Ignored on every subsequent boot.
AdminPassword string `env:"APP_ADMIN_PASSWORD" envDefault:"admin"`
// Fallback APP_NAME used only when the DB has no `app_name` row yet
// (first boot). Once written to the DB, the DB value wins.
Name string `env:"APP_NAME" envDefault:""`
// Fallback APP_URL used only when the DB has no `app_url` row yet
// (first boot). Once written to the DB, the DB value wins.
URL string `env:"APP_URL" envDefault:"http://localhost:9425"`
// HTTP listen port. CLI --port flag overrides this. Default 9425
// = "WICK" on T9 keypad — picked to avoid collisions with common
// dev tools (3000, 5173) and well-known services.
Port int `env:"PORT" envDefault:"9425"`
}
App holds env-only values. Anything user-editable at runtime belongs in the `app_variables` table instead.
type Config ¶
func Load ¶
func Load() *Config
Load parses environment variables into Config. Every field has a sensible default so running the binary without a .env still boots. App-level runtime knobs (app_url, session_secret) and SSO credentials live in the database, not here — see internal/configs and internal/sso.
Click to show internal directories.
Click to hide internal directories.