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

Add a open command #61

Merged
merged 10 commits into from
Apr 8, 2021
Merged

Add a open command #61

merged 10 commits into from
Apr 8, 2021

Conversation

jaydhulia
Copy link
Collaborator

@jaydhulia jaydhulia commented Apr 3, 2021

  • Added a open command that generates a deep ConsoleMe link, given an ARN
  • As ConsoleMe adds support for more resources, weep won't need to be updated and will auto-add support for those resources
  • Where ConsoleMe supports it (IAM Role, S3, SNS, SQS), the link will open to ConsoleMe's editor. Where ConsoleMe doesn't support that resource directly, it will try to redirect to the AWS Console with the right role through ConsoleMe
  • By default, open will open the browser, but this can be changed by including a flag

Copy link
Contributor

@patricksanders patricksanders left a comment

Choose a reason for hiding this comment

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

I like what you've done here! The one hesitation I have here is the command name in relation to its default behavior. I think we should make weep link output a link (to be used for sharing, etc) and add a weep console command that opens the link in a browser. This second command will also be used for opening a console for a requested role.

if resp.StatusCode != http.StatusOK {
return "", parseError(resp.StatusCode, document)
}
var resourceURL map[string]string
Copy link
Contributor

Choose a reason for hiding this comment

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

We should define a type for this response instead of using map[string]string here

@jaydhulia jaydhulia changed the title Add a link command Add a open command Apr 3, 2021
Copy link
Contributor

@patricksanders patricksanders left a comment

Choose a reason for hiding this comment

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

LGTM

@patricksanders patricksanders merged commit 9289745 into Netflix:master Apr 8, 2021
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.

2 participants