Repository navigation
Require Config.Stores and drop the PostgreSQL code from gonsole/auth - #77
Conversation
…migrations of gonsole/auth
… in gonsole/auth/postgres
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
There was a problem hiding this comment.
Code Health Improved
(7 files improve in Code Health)
Gates Passed
4 Quality Gates Passed
See analysis details in CodeScene
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| authorize_test.go | 8.28 → 10.00 | Complex Conditional |
| createadmin_test.go | 9.39 → 10.00 | Code Duplication |
| grantrole_test.go | 9.31 → 10.00 | Complex Conditional, Bumpy Road Ahead |
| list_test.go | 9.39 → 10.00 | Complex Conditional |
| reach_test.go | 9.10 → 10.00 | Code Duplication, String Heavy Function Arguments |
| record_test.go | 8.82 → 10.00 | Complex Conditional |
| records_test.go | 8.16 → 10.00 | Complex Method, Complex Conditional |
Quality Gate Profile: Clean Code Collective
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
Closes #76
What
Config.Storesis required. A nil one makes every account command,AuthorizeandRecordfail with an error that names it.Migration,RecordMigration,PostgresRecordsand the records migration are removed.gonsole/auth/postgreshasMigration,RecordMigrationandNewRecordStorein their place.authkit/postgres.recordstest. CI tests the module with no PostgreSQL server.dbkit/postgres/compose.yaml.Why
A program on SQLite that imports
gonsole/authlinks the PostgreSQL driver today, through the default of a nilConfig.Stores. Now the core holds the interfaces and the commands, and each engine lives in a module of its own. This is a breaking change, released as 0.8.0.Testing Instructions
Stop the PostgreSQL test server of
gonsole/auth/compose.yamland start it fromdbkit/postgres/compose.yaml. The tests ofdbkit/postgresandgonsole/auth/postgrespass on it.Summary by CodeRabbit
Config.Storesis required. Authentication commands, authorization, and record creation fail if it is unset.gonsole/authno longer provides PostgreSQL migrations or record storage. Usegonsole/auth/postgresfor PostgreSQL-backed capabilities.gonsole/auth.