Commit Graph

69 Commits

Author SHA1 Message Date
4c5af63ea2 refactor to improve database operability in hwsauth hwsauth/v0.3.0 2026-01-11 23:00:50 +11:00
ae4094d426 refactor to improve database operability jwt/v0.10.0 2026-01-11 22:21:44 +11:00
1b25e2f0a5 Refactor database interface to use *sql.DB directly
Simplified the database layer by removing custom interface wrappers
and using standard library *sql.DB and *sql.Tx types directly.

Changes:
- Removed DBConnection and DBTransaction interfaces from database.go
- Removed NewDBConnection() wrapper function
- Updated TokenGenerator to use *sql.DB instead of DBConnection
- Updated all validation and revocation methods to accept *sql.Tx
- Updated TableManager to work with *sql.DB directly
- Updated all tests to use db.Begin() instead of custom wrappers
- Fixed GeneratorConfig.DB field (was DBConn)
- Updated documentation in doc.go with correct API usage

Benefits:
- Simpler API with fewer abstractions
- Works directly with database/sql standard library
- Compatible with GORM (via gormDB.DB()) and Bun (share same *sql.DB)
- Easier to understand and maintain
- No unnecessary wrapper layers

Breaking changes:
- GeneratorConfig.DBConn renamed to GeneratorConfig.DB
- Removed NewDBConnection() function - pass *sql.DB directly
- ValidateAccess/ValidateRefresh now accept *sql.Tx instead of DBTransaction
- Token.Revoke/CheckNotRevoked now accept *sql.Tx instead of DBTransaction

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-11 17:39:30 +11:00
557e9812e6 added error or invalid log level hlog/v0.9.1 2026-01-10 18:52:17 +11:00
f3312f7aef added more int parsing and tests env/v0.9.1 2026-01-10 18:22:16 +11:00
61d519399f fixed incorrect import hwsauth/v0.2.0 2026-01-04 01:11:25 +11:00
b13b783d7e created hwsauth module hwsauth/v0.1.0 2026-01-04 01:01:17 +11:00
14eec74683 created hws module hws/v0.1.0 2026-01-04 00:59:24 +11:00
ade3fa0454 imported env module env/v0.9.0 2026-01-02 19:03:07 +11:00
516be905a9 imported cookies module cookies/v0.9.0 2026-01-02 18:25:38 +11:00
6e632267ea added cookie control to jwt jwt/v0.9.2 2026-01-02 18:15:49 +11:00
05aad5f11b fixed transaction issues jwt/v0.9.1 2026-01-01 22:44:39 +11:00
c4574e32c7 imported tmdb module tmdb/v0.8.0 2026-01-01 20:42:50 +11:00
c466cd3163 imported jwt module jwt/v0.9.0 2026-01-01 20:33:16 +11:00
72e1513fae cleaned up structure hlog/v0.9.0 2026-01-01 14:54:14 +11:00
e9a4696c99 fixed package name 2026-01-01 14:38:10 +11:00
46e67cb345 changed module name 2026-01-01 14:18:31 +11:00
201af4af7a imported logging module 2025-12-31 20:20:03 +11:00
386f40a884 created logged module 2025-12-31 20:10:55 +11:00