EncryptedSecrets (encrypted_secrets v0.2.3) View Source

Provides methods for setting up, editing, and reading of encrypted secrets

Link to this section Summary

Functions

Decrypts, opens, and saves secrets file. Your EDITOR must be in "wait" mode. For example EDITOR='code --wait'

Decrypts and parses secrets file, returning it as a map. Raises an exception if file can't be read

Creates a new key and secrets file, prompting you if the files already exist

Creates a new key and secrets file, automatically overwriting files if they exist. Use with caution

Link to this section Functions

Link to this function

edit(key \\ File.read!("priv/secrets/master.key"), secrets_path \\ "priv/secrets/secrets.yml.enc")

View Source

Decrypts, opens, and saves secrets file. Your EDITOR must be in "wait" mode. For example EDITOR='code --wait'

Returns :ok | {:error, message}

Link to this function

read(key \\ File.read!("priv/secrets/master.key"), secrets_path \\ "priv/secrets/secrets.yml.enc")

View Source

Decrypts and parses secrets file, returning it as a map

Returns {:ok, secrets_map} | {:error, message}

Link to this function

read!(key \\ File.read!("priv/secrets/master.key"), secrets_path \\ "priv/secrets/secrets.yml.enc")

View Source

Decrypts and parses secrets file, returning it as a map. Raises an exception if file can't be read

Returns {:ok, secrets_map}

Link to this function

setup(key_path \\ "priv/secrets/master.key", secrets_path \\ "priv/secrets/secrets.yml.enc")

View Source

Creates a new key and secrets file, prompting you if the files already exist

Returns {:ok, secrets_path} | {:error, message}

Link to this function

setup!(key_path \\ "priv/secrets/master.key", secrets_path \\ "priv/secrets/secrets.yml.enc")

View Source

Creates a new key and secrets file, automatically overwriting files if they exist. Use with caution

Returns {:ok, secrets_path} | {:error, message}