Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dependencies ¶
type Dependencies struct { Logger zerolog.Logger Storer providers.VaultStorer }
Dependencies defines the dependencies for the plugin provider.
type KrokVault ¶
type KrokVault struct { Dependencies sync.RWMutex // contains filtered or unexported fields }
KrokVault is the vault used by Krok.
func NewKrokVault ¶
func NewKrokVault(deps Dependencies) *KrokVault
NewKrokVault creates a vault which contains secrets. The format is: KEY=VALUE KEY2=VALUE2
func (*KrokVault) AddSecret ¶
AddSecret adds a value to the vault. Add will overwrite if the key already exists and not warn.
func (*KrokVault) DeleteSecret ¶
DeleteSecret deletes a secret from the vault. DeleteSecret is a no-op if the data doesn't exist.
func (*KrokVault) GetSecret ¶
GetSecret returns a value for a key. This operation is safe to use concurrently. Get will return an error if the data doesn't exist.
func (*KrokVault) ListSecrets ¶
ListSecrets lists all secret names. Not the values.
func (*KrokVault) LoadSecrets ¶
LoadSecrets unlocks the vault and loads in all secrets.
func (*KrokVault) SaveSecrets ¶
SaveSecrets saves all the secrets to the vault. Persisting new values.