Skip to content

Some improvement suggestions #72

@Skarlso

Description

@Skarlso

Hello. :) Just a couple of suggestions for this library:

	if err := template.Must(template.New("list_path").Parse("/vault_secrets")).Execute(&path, paging); err != nil {
		panic(err)
	}

An SDK should never panic please. Capture this error in the iterator somehow or return it or alter the List interface to return iterator, error.

Please add a convenient way to look for secrets and vaults by name, because that's a big usecase. Now, people have to always list everything if looking for a secret by name and by vault if the vault ID or Secret ID is unknown leading to a massive API call surplus.

For example a simple push operation for a secret where we are checking if the secret exists adds TWO List calls. First, list all vaults find the one we know about, then list all secrets in the vault to find the one we know about. Because people will not use the ID of the secret, they will use the name.

I'm not familiar enough with ngrok, is the name unique or can it be multiple secrets with the same name? If yes, I would suggest adding a filter option into the List to further make the life of users easier.

Thanks! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions