refactor(usecase): migrate show operations to provider interfaces#149
Closed
mpyw wants to merge 2 commits intomulticloudfrom
Closed
refactor(usecase): migrate show operations to provider interfaces#149mpyw wants to merge 2 commits intomulticloudfrom
mpyw wants to merge 2 commits intomulticloudfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## multicloud #149 +/- ##
==============================================
+ Coverage 87.14% 88.39% +1.24%
==============================================
Files 139 144 +5
Lines 8170 8306 +136
==============================================
+ Hits 7120 7342 +222
+ Misses 806 696 -110
- Partials 244 268 +24
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
19a2738 to
59d1af2
Compare
- Add Resolve functions to paramversion and secretversion packages - Add shared ApplyShift helper in version/internal - Update param/show.go to use paramversion.Resolve - Update secret/show.go to use secretversion.Resolve - Remove version resolution logic from usecase layer - Keep VersionResolverClient for backward compatibility (diff/log not migrated yet) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
59d1af2 to
e7ab094
Compare
- Add model/resource.go with unified Resource type and ResourceKind enum - Add provider/resource.go with unified Tagger interface - Add usecase/resource/show.go with unified ShowUseCase - Refactor param.ShowUseCase to use resource.ShowUseCase internally - Refactor secret.ShowUseCase to use resource.ShowUseCase internally This provides a foundation for multi-cloud support by: - Unifying common logic (tag fetching) in resource.ShowUseCase - Using Kind enum to distinguish parameter vs secret resources - Keeping backward-compatible interfaces for CLI/GUI layers Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Owner
Author
|
Closing this PR due to design issue: AWS-specific knowledge (ARN, Type) leaking into provider-agnostic Resource model. Root cause: Tag migration (PR #147) is kept as it doesn't have this problem. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
showusecases to use provider interfacesparamversionandsecretversionpackagesversion/internalChanges
Version Package Updates
version/internal/resolve.go: NewApplyShifthelper for shared shift logicparamversion/resolve.go: NewResolvefunction usingprovider.ParameterReadersecretversion/resolve.go: NewResolvefunction usingprovider.SecretReaderShow Migration
usecase/param/show.go: Useparamversion.Resolveinstead of local resolverusecase/secret/show.go: Usesecretversion.Resolveinstead of local resolverusecase/param/version_resolver.go(moved to paramversion)usecase/secret/version_resolver.go(keep onlyVersionResolverClientfor diff/log)Unchanged (for future PRs)
diff.goandlog.gostill use old AWS SDK typesVersionResolverClientkept for backward compatibilityTest plan
make testpassesmake lintpasses🤖 Generated with Claude Code