Commit Graph

11 Commits

Author SHA1 Message Date
user
a9586eb95f fix: resolve funcorder and noinlineerr issues 2026-02-20 03:30:01 -08:00
user
2f6d1f284c fix: resolve cyclop, funlen issues by extracting helper methods 2026-02-20 03:29:18 -08:00
user
e0da78f17c fix: resolve wsl_v5, lll, noinlineerr, and gosec lint issues 2026-02-20 03:26:06 -08:00
user
c6c5aaf48e fix: resolve noctx lint issues 2026-02-20 03:19:19 -08:00
user
3d968a1102 fix: resolve noinlineerr lint issues 2026-02-20 03:17:09 -08:00
clawbot
c1040ff69d fix: resolve nlreturn, modernize, perfsprint, wsl_v5, and partial err113 lint issues 2026-02-20 02:59:15 -08:00
95ccc1b2cd Add complete database schema and ORM models (#4) 2026-02-11 03:02:33 +01:00
clawbot
6a108749a1 Fix all lint issues and update AGENTS.md workflow rules
- Fix stuttering type names (e.g. config.ConfigParams → config.Params)
- Add doc comments to all exported types/functions/methods
- Add package doc comments to all packages
- Fix JSON tags to camelCase
- Extract magic numbers to constants
- Add blank lines per nlreturn/wsl_v5 rules
- Use errors.Is() for error comparison
- Unexport NewLoggingResponseWriter (not used externally)
- Replace for-range on ctx.Done() with channel receive
- Rename unused parameters to _
- AGENTS.md: all changes via feature branches, no direct main commits
2026-02-09 12:33:08 -08:00
clawbot
7b0ff178d4 AGENTS.md: no direct commits to main, all changes via feature branches 2026-02-09 12:31:14 -08:00
clawbot
5e9be8ccaf Add models package with embedded DB interface pattern
- internal/models/model.go: DB interface + Base struct for all models
- internal/models/channel.go: Channel model with DB access for relation queries
- Database.NewChannel() factory injects db reference into model instances
- Uses interface to avoid circular imports (models -> db)
2026-02-09 12:24:23 -08:00
clawbot
8bb083a7f8 Add project scaffolding with fx DI, SQLite migrations, and healthcheck
- go.mod with git.eeqj.de/sneak/chat module
- internal packages: globals, logger, config, db, healthcheck, middleware, handlers, server
- SQLite database with embedded migration system (schema_migrations tracking)
- Migration 001: schema_migrations table
- Migration 002: channels table
- Config with chat-specific vars (MAX_HISTORY, SESSION_TIMEOUT, MAX_MESSAGE_SIZE, MOTD, SERVER_NAME, FEDERATION_KEY)
- Healthcheck endpoint at /.well-known/healthcheck.json
- Makefile, .gitignore
- cmd/chatd/main.go entry point
2026-02-09 12:22:28 -08:00