Skip to content

Take credentials as command argument #102

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

Merged
merged 2 commits into from
Apr 19, 2022
Merged

Take credentials as command argument #102

merged 2 commits into from
Apr 19, 2022

Conversation

polldo
Copy link
Contributor

@polldo polldo commented Apr 13, 2022

Motivation

We need to allow everyone to use the cloud-cli commands programmatically.
At the moment there is no way to specify credentials when using the command package as dependency (from an external project): they're automatically retrieved from a config file or from env.

Change description

this pr allows to specify credentials when executing commands belonging to the command package

  • remove the config retrieval from the command package
  • each command will take credentials as argument
  • the retrieval of the config is now done in the cli package

Additional Notes

Reviewer checklist

  • PR address a single concern.
  • PR title and description are properly filled.
  • Changes will be merged in main.
  • Changes are covered by tests.
  • Logging is meaningful in case of troubleshooting.
  • History is clean, commit messages are meaningful (see CONTRIBUTING.md) and are well formatted.

@polldo polldo requested review from rsora and mirkokurt April 14, 2022 08:27
Copy link

@rsora rsora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM I like this refactoring, this way command package can be used better as an SDK 👍

Copy link
Collaborator

@mirkokurt mirkokurt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have very little context, but it LGTM

Base automatically changed from polldo/iotclient-interface to main April 19, 2022 09:05
@polldo polldo force-pushed the polldo/pass-credentials branch from 0045fd6 to 5ab65bb Compare April 19, 2022 09:06
@polldo polldo merged commit c7e87c2 into main Apr 19, 2022
@polldo polldo deleted the polldo/pass-credentials branch April 19, 2022 09:13
polldo added a commit that referenced this pull request Sep 2, 2022
allow to specify credentials when using the 'command' package as a go dependency
- remove the config retrieval from the command package
- the retrieval of the config is now done in the cli package
- each command will take credentials as argument
polldo added a commit that referenced this pull request Sep 2, 2022
allow to specify credentials when using the 'command' package as a go dependency
- remove the config retrieval from the command package
- the retrieval of the config is now done in the cli package
- each command will take credentials as argument
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.

3 participants