Skip to content

Delete and Move APIs #12

Description

@moogar0880

The purpose of this issue is to expand upon the existing ConfigStore API to add methods for removing and renaming keys in the ConfigStore.

API

Currently there is no mechanism for performing these operations within venom, however, the logic to implement them should be fairly simple. Two new methods should be added to the ConfigStore interface:

func Move(from, to string) error
func Delete(key string)

Both of these methods must be implemented by the Venom type, which is itself a ConfigStore, along with one additional method:

func MoveAndAlias(from, to string) error

This MoveAndAlias method will, just like it sounds, perform a Move and an Alias to ensure that the configuration data is available under the new keyspace, but that any applications using the old name will still be supported.

Additional Considerations

  • Delete operations should be considered successful even if the specified key does not exist
  • Move should return an error if either the from key does not exist or if data is already stored under the to keyspace.

Note: The addition of the Move and Delete methods to the ConfigStore API is a breaking change and will require a major version bump once merged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeThis issue or pull request introduces a breaking changeenhancementNew feature or requestgood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions