-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 guide to writing an Access Request plugin #22441
Conversation
docs/pages/api/access-plugin.mdx
Outdated
```go | ||
func (g *googleSheetsPlugin) makeRowData(ar types.AccessRequest) *sheets.RowData { | ||
|
||
t := ar.GetCreationTime().String() |
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 find this hard to follow, since the variables have non-descriptive names and are used a dozen or so lines after they are declared.
How about a helper:
func stringPtr(s string) *string { return &s
Then you don't need these variables here and you inline them below.
UserEnteredValue: &sheets.ExtendedValue{
StringValue: stringPtr(ar.GetCreationTime().String()),
},
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.
Added for the one-line assignments. For the request state and link string, I used descriptive variable names instead.
a036718
to
6cc2f72
Compare
@alexfornuto This should be ready for a copy review |
Closes #22227 This guide uses a minimal working example of an Access Request plugin to demonstrate some of the key libraries that Teleport makes available to plugin developers. The guide is based on a 270-line plugin that manages Access Requests using Google Sheets.
- Update the line of code count in the demo program - Mention Machine ID
6cc2f72
to
4c64f7c
Compare
@hugoShaka @zmb3 Just checking to see if you were planning to give this another review. Thanks! |
@ptgott some misspellings here. I'll post in here the |
Spell fixes in #23068 |
* Add a guide to writing an Access Request plugin Closes #22227 This guide uses a minimal working example of an Access Request plugin to demonstrate some of the key libraries that Teleport makes available to plugin developers. The guide is based on a 270-line plugin that manages Access Requests using Google Sheets. * Respond to hugoShaka feedback * Respond to zmb3 feedback * Add some minor tweaks - Update the line of code count in the demo program - Mention Machine ID * Respond to alexfornuto PR feedback
* Add a guide to writing an Access Request plugin Closes #22227 This guide uses a minimal working example of an Access Request plugin to demonstrate some of the key libraries that Teleport makes available to plugin developers. The guide is based on a 270-line plugin that manages Access Requests using Google Sheets. * Respond to hugoShaka feedback * Respond to zmb3 feedback * Add some minor tweaks - Update the line of code count in the demo program - Mention Machine ID * Respond to alexfornuto PR feedback
* Add a guide to writing an Access Request plugin (#22441) * Add a guide to writing an Access Request plugin Closes #22227 This guide uses a minimal working example of an Access Request plugin to demonstrate some of the key libraries that Teleport makes available to plugin developers. The guide is based on a 270-line plugin that manages Access Requests using Google Sheets. * Respond to hugoShaka feedback * Respond to zmb3 feedback * Add some minor tweaks - Update the line of code count in the demo program - Mention Machine ID * Respond to alexfornuto PR feedback * spell fixes plugin api docs (#23068) --------- Co-authored-by: Steven Martin <steven@goteleport.com>
* Add a guide to writing an Access Request plugin (#22441) * Add a guide to writing an Access Request plugin Closes #22227 This guide uses a minimal working example of an Access Request plugin to demonstrate some of the key libraries that Teleport makes available to plugin developers. The guide is based on a 270-line plugin that manages Access Requests using Google Sheets. * Respond to hugoShaka feedback * Respond to zmb3 feedback * Add some minor tweaks - Update the line of code count in the demo program - Mention Machine ID * Respond to alexfornuto PR feedback * spell fixes plugin api docs (#23068) --------- Co-authored-by: Steven Martin <steven@goteleport.com>
* Add a guide to writing an Access Request plugin Closes #22227 This guide uses a minimal working example of an Access Request plugin to demonstrate some of the key libraries that Teleport makes available to plugin developers. The guide is based on a 270-line plugin that manages Access Requests using Google Sheets. * Respond to hugoShaka feedback * Respond to zmb3 feedback * Add some minor tweaks - Update the line of code count in the demo program - Mention Machine ID * Respond to alexfornuto PR feedback
* Add a guide to writing an Access Request plugin (#22441) * Add a guide to writing an Access Request plugin Closes #22227 This guide uses a minimal working example of an Access Request plugin to demonstrate some of the key libraries that Teleport makes available to plugin developers. The guide is based on a 270-line plugin that manages Access Requests using Google Sheets. * Respond to hugoShaka feedback * Respond to zmb3 feedback * Add some minor tweaks - Update the line of code count in the demo program - Mention Machine ID * Respond to alexfornuto PR feedback * spell fixes plugin api docs (#23068) * Linter fixes --------- Co-authored-by: Steven Martin <steven@goteleport.com>
Closes #22227
This guide uses a minimal working example of an Access Request plugin to demonstrate some of the key libraries that Teleport makes available to plugin developers. The guide is based on a 270-line plugin that manages Access Requests using Google Sheets.