Merged
Conversation
joe0BAB
reviewed
Jun 23, 2025
store/store.go
Outdated
| // with the secrets engine | ||
| type Store interface { | ||
| // Erase removes credentials from the store for a given ID. | ||
| Erase(ctx context.Context, id ID) error |
Collaborator
There was a problem hiding this comment.
Delete? I'd stick to conventions which usually is Delete or Remove.
joe0BAB
reviewed
Jun 23, 2025
store/store.go
Outdated
| // GetAll retrieves all the credentials from the store. | ||
| GetAll(ctx context.Context) (map[ID]Secret, error) | ||
| // Store saves credentials in the store. | ||
| Store(ctx context.Context, id ID, secret Secret) error |
Collaborator
There was a problem hiding this comment.
Set or Save? Same reasons as above.
Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
joe0BAB
approved these changes
Jun 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The secrets engine is opinionated on the key format (id of the secret). Each secret stored should store or at a minimum map the key to the
secrets.ID.This patch adds two new interfaces to the secrets engine:
StoreSecretA
Storecan be a physical file or a wrapper around anAPI.A
Secretcan be anything as long as it can beMarshalledandUnmarshalled.The implementer of a
Secretis responsible for maintaining the format of a secret. The secrets engine does not enforce a particular encoder or marshaller. The implementer is free to decide.