ExVault v0.1.0-beta.1 ExVault.KV1 View Source

A very thin wrapper over the basic operations for working with KV v1 data.

Construct a backend--a client paired with the mount path for the kv version 1 secrets engine it interacts with--using the ExVault.KV1.new/2 function.

Each of the operations in this module have a variant that operates on a client and mount path, and another that operates on a backend.

See the Vault documentation for the secrets engine.

Link to this section Summary

Functions

Delete a key

List the keys

Create a new backend for the kv version 1 secrets engine

Read the value of a key

Read the value of a key

Write the value of a key

Write the value of a key

Link to this section Types

Link to this type

t() View Source
t() :: %ExVault.KV1{client: ExVault.client(), mount: String.t()}

Link to this section Functions

Link to this function

delete(backend, path) View Source
delete(t(), String.t()) :: ExVault.response()

Delete a key.

Params:

  • backend the ExVault.KV1 backend.
  • path the path to the key in the secrets engine.

Delete a key.

Params:

  • client the ExVault client.
  • mount the mount path for the kv secrets engine.
  • path the path to the key in the secrets engine.

List the keys.

Params:

  • backend the ExVault.KV1 backend.
  • path the path to the key or key prefix in the secrets engine.

List the keys.

Params:

  • client the ExVault client.
  • mount the mount path for the kv secrets engine.
  • path the path to the key or key prefix in the secrets engine.

Create a new backend for the kv version 1 secrets engine.

Params:

  • client the ExVault client.
  • mount the mount path for the kv secrets engine.

Read the value of a key.

Params:

  • backend the ExVault.KV1 backend.
  • path the path to the key in the secrets engine.

Read the value of a key.

Params:

  • client the ExVault client.
  • mount the mount path for the kv secrets engine.
  • path the path to the key in the secrets engine.
Link to this function

write(backend, path, data) View Source
write(t(), String.t(), any()) :: ExVault.response()

Write the value of a key.

Params:

  • backend the ExVault.KV1 backend.
  • path the path to the key in the secrets engine.
  • data the data to write as a map of string keys to string values.
Link to this function

write(client, mount, path, data) View Source
write(ExVault.client(), String.t(), String.t(), %{
  optional(String.t()) => String.t()
}) :: ExVault.response()

Write the value of a key.

Params:

  • client the ExVault client.
  • mount the mount path for the kv secrets engine.
  • path the path to the key in the secrets engine.
  • data the data to write as a map of string keys to string values.