Skip to content
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

Isolate all the Runfunctions to API & Represent output as YAML or JSON or Table #16

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bishal7679
Copy link
Contributor

@bishal7679 bishal7679 commented Feb 13, 2024

Part of fixing #11

Previous State

  • Previously, only JSON output was supported
  • Codebase was unstructured
  • Logging the error messages was not so good

Current Behaviour

part 1

  • Restructured the whole codebase with efficient manner
  • Separated all the RunFunctions to api folder apis.go which will eventually be used by cobra commands
  • Separated all the useful packages like util to internal/pkg and under logger folder added nicely formatted logger for showing Error messages/Info beautifully
  • Also isolated all the struct used by all RunFunctions to config folder as resourceStruct.go

part 2

  • Support YAML, JSON and Table output format as suggested
  • Making Table output default
  • Added -o wide: This parameter allows us to display extra information (if needed, otherwise -o wide should have no effect)
  • Also solving the create project flow into create_project.go file by adding cobra Args and making the public as false default [part of Improve Creating Project flow. #12]

Remaining feat to add [Need some discussions on these]

  • --sort-by: This parameter allows us to sort the output based on the resource attribute we specify.
  • Support of JSONPath, or GO template.
  • -f, --field-selector==: This parameter allows us to filter the output using some resource attributes.

Signed-off-by: bishal7679 <bishalhnj127@gmail.com>
Signed-off-by: bishal7679 <bishalhnj127@gmail.com>
@bupd bupd added the invalid This doesn't seem right label Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants