Skip to content

refactor: improve tokenization module#102

Merged
allisson merged 1 commit intomainfrom
improve-tokenization
Mar 4, 2026
Merged

refactor: improve tokenization module#102
allisson merged 1 commit intomainfrom
improve-tokenization

Conversation

@allisson
Copy link
Owner

@allisson allisson commented Mar 4, 2026

  • Add ErrTokenizationKeyCreatedAtInvalid and update TokenizationKey.Validate() to use it for zero creation timestamps.
  • Refactor Rotate() use case method to reuse createTokenizationKey helper, reducing code duplication.
  • Remove unused offset/limit-based List repository methods from both PostgreSQL and MySQL repositories.
  • Add comprehensive integration tests for Get and GetByNameAndVersion repository methods in MySQL and PostgreSQL.
  • Improve docstrings for Rotate, Delete, ListCursor, and PurgeDeleted use case methods.

- Add `ErrTokenizationKeyCreatedAtInvalid` and update `TokenizationKey.Validate()` to use it for zero creation timestamps.
- Refactor `Rotate()` use case method to reuse `createTokenizationKey` helper, reducing code duplication.
- Remove unused offset/limit-based `List` repository methods from both PostgreSQL and MySQL repositories.
- Add comprehensive integration tests for `Get` and `GetByNameAndVersion` repository methods in MySQL and PostgreSQL.
- Improve docstrings for `Rotate`, `Delete`, `ListCursor`, and `PurgeDeleted` use case methods.
@allisson allisson merged commit 49800af into main Mar 4, 2026
3 checks passed
@allisson allisson deleted the improve-tokenization branch March 4, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant