-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for --json
output in secrets fetching
#2363
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2363 +/- ##
==========================================
+ Coverage 54.63% 54.66% +0.02%
==========================================
Files 582 582
Lines 78401 78454 +53
==========================================
+ Hits 42832 42883 +51
- Misses 32359 32360 +1
- Partials 3210 3211 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I've tested the command, and it's working great! 👍
not an issue but I think generic may be a bit overkill here (or maybe im just getting older).
type ( | ||
secretDisplayType interface { | ||
validatorKeyInfo | validatorStateInfo | nodeKeyInfo | ||
} | ||
|
||
displayFn[T secretDisplayType] func(input T) error | ||
outputFn[T secretDisplayType] func(input T, io commands.IO) error | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm probably too old-school, but I'm unsure of the purpose of using a generic approach instead of directly interfacing each structure with a marshal, display, or similar method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with @gfanton , I think we can simplify this logic a bit by using a common interface in a way that processes the data in a specific way depending on the implementation.
@ajnavarro @gfanton |
Description
This PR introduces a new
--json
flag for secrets fetch output, while keeping the old "structured" terminal output.I propose we start thinking about how to drop the structured output completely, and mimic the display functionality we have for
gnoland config get
, with key value pairs, so our DevOps friends retain a bit of sanity.Closes #2301
Closes #2331
cc @mazzy89
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description