AWS credential plugin maintenance #7114
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I am about to start working on #5844 , and I noticed that this plugin could use some updates.
This PR places functions that create paths paths on the
backend
rather than passing thebackend
into them. This makes sense because a) they're only used by the backend, and b) a path is something thebackend
has, so it jives with OOP. We also do it elsewhere now as the standard practice.This also strips redundant field type declarations like the
&Object
below, which is no longer preferred in Go:This also replaces deprecated fields. Vault's implementation of OpenAPI has deprecated the
Callbacks
field in favor ofOperations
. AWS has deprecatedsession.New
(which doesn't return an error) in favor ofsession.NewSession
.I also fixed a couple of minor linting issues along the way.