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
Delete a key
List the keys
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
t()
View Source
t() :: %ExVault.KV1{client: ExVault.client(), mount: String.t()}
t() :: %ExVault.KV1{client: ExVault.client(), mount: String.t()}
Link to this section Functions
delete(backend, path)
View Source
delete(t(), String.t()) :: ExVault.response()
delete(t(), String.t()) :: ExVault.response()
Delete a key.
Params:
backend
theExVault.KV1
backend.path
the path to the key in the secrets engine.
delete(client, mount, path)
View Source
delete(ExVault.client(), String.t(), String.t()) :: ExVault.response()
delete(ExVault.client(), String.t(), String.t()) :: ExVault.response()
Delete a key.
Params:
client
theExVault
client.mount
the mount path for thekv
secrets engine.path
the path to the key in the secrets engine.
list(backend, path)
View Source
list(t(), String.t()) :: ExVault.response()
list(t(), String.t()) :: ExVault.response()
List the keys.
Params:
backend
theExVault.KV1
backend.path
the path to the key or key prefix in the secrets engine.
list(client, mount, path)
View Source
list(ExVault.client(), String.t(), String.t()) :: ExVault.response()
list(ExVault.client(), String.t(), String.t()) :: ExVault.response()
List the keys.
Params:
client
the ExVault client.mount
the mount path for thekv
secrets engine.path
the path to the key or key prefix in the secrets engine.
new(client, mount)
View Source
new(ExVault.client(), String.t()) :: t()
new(ExVault.client(), String.t()) :: t()
Create a new backend for the kv
version 1 secrets engine.
Params:
client
theExVault
client.mount
the mount path for thekv
secrets engine.
read(backend, path)
View Source
read(t(), String.t()) :: ExVault.response()
read(t(), String.t()) :: ExVault.response()
Read the value of a key.
Params:
backend
theExVault.KV1
backend.path
the path to the key in the secrets engine.
read(client, mount, path)
View Source
read(ExVault.client(), String.t(), String.t()) :: ExVault.response()
read(ExVault.client(), String.t(), String.t()) :: ExVault.response()
Read the value of a key.
Params:
client
theExVault
client.mount
the mount path for thekv
secrets engine.path
the path to the key in the secrets engine.
write(backend, path, data)
View Source
write(t(), String.t(), any()) :: ExVault.response()
write(t(), String.t(), any()) :: ExVault.response()
Write the value of a key.
Params:
backend
theExVault.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.
write(client, mount, path, data)
View Source
write(ExVault.client(), String.t(), String.t(), %{
optional(String.t()) => String.t()
}) :: ExVault.response()
write(ExVault.client(), String.t(), String.t(), %{ optional(String.t()) => String.t() }) :: ExVault.response()
Write the value of a key.
Params:
client
theExVault
client.mount
the mount path for thekv
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.