EncryptedSecrets (encrypted_secrets v0.3.0) 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
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
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}
read(key \\ File.read!("priv/secrets/master.key"), secrets_path \\ "priv/secrets/secrets.yml.enc")
View SourceDecrypts and parses secrets file, returning it as a map
Returns {:ok, secrets_map} | {:error, message}
read!(key \\ File.read!("priv/secrets/master.key"), secrets_path \\ "priv/secrets/secrets.yml.enc")
View SourceDecrypts and parses secrets file, returning it as a map. Raises an exception if file can't be read
Returns {:ok, secrets_map}
setup(key_path \\ "priv/secrets/master.key", secrets_path \\ "priv/secrets/secrets.yml.enc")
View SourceCreates a new key and secrets file, prompting you if the files already exist
Returns {:ok, secrets_path} | {:error, message}
setup!(key_path \\ "priv/secrets/master.key", secrets_path \\ "priv/secrets/secrets.yml.enc")
View SourceCreates a new key and secrets file, automatically overwriting files if they exist. Use with caution
Returns {:ok, secrets_path} | {:error, message}