Files
CollabTable/shared/backend
Gabriel20xxandClaude Sonnet 5 40578f5392 Auto-detect scheme for AUTHGUARD_URL instead of always assuming https
A bare host:port (e.g. a LAN AuthGuard reachable only over plain HTTP)
was always defaulting to https, so a TLS handshake against a plain-HTTP
AuthGuard failed at the transport level. Now a loopback, RFC1918/RFC4193
private, or link-local host (or a .local name) defaults to http instead;
an explicit http:// or https:// is still always honored as-is.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-03 21:48:08 +02:00
..
2026-09-01 21:51:45 +02:00
2026-08-06 16:53:48 +02:00
2026-08-06 16:53:48 +02:00
2026-08-06 16:53:48 +02:00
2026-08-06 16:53:48 +02:00

Shared Go backend packages

The Go packages under this directory hold infrastructure shared by the services, not application-specific SQL or HTTP handlers.

  • config — environment string, required value, boolean, integer, and duration helpers.
  • postgres — validated DATABASE_URL configuration, pgxpool creation/ping, transaction wrapper, and PostgreSQL error classification.
  • auth — shared bcrypt policy, secure token generation/hashing, account/session schema, and account/session persistence.
  • authclient — HTTP client and net/http middleware for services that adopt the centralized AuthServer instead of embedding auth against their own database.
  • migrate — embedded filesystem adapter for Goose migrations.
  • logshipper — client adapter for LoggingServer (Web/LoggingServer): batches and ships log entries centrally while mirroring the same human-readable output and Debug/Info/Warn/Error/Critical/Audit/*Ctx method surface as each project's local internal/logging package.

Run go test ./... and go vet ./... from this directory. The module path is repos.gfranz.ch/Gabriel20xx/shared/backend; change it if the shared folder is hosted under a different repository path.

Application-specific table definitions and HTTP behavior stay in the service. That lets a service reuse reliable connection/auth plumbing without coupling its domain model to another project.