[LFXV2-1460] feat: use fga-sync shared types and constants for GenericFGAMessage#29
Conversation
…cFGAMessage Replace locally-defined GenericFGAMessage struct and hardcoded FGA NATS subject strings with canonical types and constants from lfx-v2-fga-sync/pkg/types and lfx-v2-fga-sync/pkg/constants. - Remove local GenericFGAMessage struct - Use fgatypes.GenericFGAMessage, GenericAccessData, GenericDeleteData - Use fgaconstants.GenericUpdateAccessSubject and GenericDeleteAccessSubject instead of local UpdateAccessSubject/DeleteAccessSubject constants 🤖 Generated with [Claude Code](https://claude.ai/code) Signed-off-by: Andres Tobon <andrest2455@gmail.com>
There was a problem hiding this comment.
Pull request overview
Updates the voting service’s NATS publisher to use the canonical FGA-sync message types and subject constants, removing locally duplicated FGA message definitions and hardcoded subject strings.
Changes:
- Replace the local
GenericFGAMessageusage withlfx-v2-fga-sync/pkg/types(GenericFGAMessage,GenericAccessData,GenericDeleteData) in the NATS publisher. - Replace hardcoded FGA subject strings with
lfx-v2-fga-sync/pkg/constantsexported subjects. - Bump module dependencies to pull in the updated
lfx-v2-fga-syncversion and its transitive requirements.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| internal/infrastructure/eventing/nats_publisher.go | Switches FGA message construction and publish subjects to shared lfx-v2-fga-sync types/constants. |
| go.mod | Updates dependency graph to include the newer lfx-v2-fga-sync version and additional transitive deps. |
| go.sum | Records updated module sums resulting from the dependency bump. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| github.com/lestrrat-go/iter v1.0.2 // indirect | ||
| github.com/lestrrat-go/jwx/v2 v2.1.6 // indirect | ||
| github.com/lestrrat-go/option v1.0.1 // indirect | ||
| github.com/linuxfoundation/lfx-v2-fga-sync v0.2.17-0.20260413222802-7f3a6be4424e // indirect |
There was a problem hiding this comment.
github.com/linuxfoundation/lfx-v2-fga-sync is now imported by this module (see internal/infrastructure/eventing/nats_publisher.go), so it shouldn't be marked // indirect in go.mod. Please run go mod tidy (or move it into the main require block) so the direct dependency is recorded correctly and the module files stay stable across builds.
Fix import ordering to satisfy golangci-lint gofmt check. Generated with [Claude Code](https://claude.ai/code) Signed-off-by: Andres Tobon <andrest2455@gmail.com>
f722168 to
b347473
Compare
Generated with [Claude Code](https://claude.ai/code) Signed-off-by: Andres Tobon <andrest2455@gmail.com>
Summary
GenericFGAMessagestruct and FGA subject constants from voting servicelfx-v2-fga-sync/pkg/types(GenericFGAMessage,GenericAccessData,GenericDeleteData)lfx-v2-fga-sync/pkg/constants(GenericUpdateAccessSubject,GenericDeleteAccessSubject)lfx-v2-fga-syncdependency to pick up the new exported constantsTicket
LFXV2-1460
🤖 Generated with Claude Code