AshVault.Dsl (AshVault v0.2.0)

Copy Markdown View Source

The ash_vault DSL section, as consumed by use Spark.Dsl.Extension in AshVault.

use Ash.Resource, extensions: [AshVault]

ash_vault do
  vault MyApp.Vault
  scope :tenant

  encrypt :email
  encrypt :ssn, encrypt_nil?: false

  decrypt_by_default [:email]
end

attributes [:email, :ssn] is sugar for a list of encrypt entities with default options; AshVault.Transformers.ExpandAttributes expands it.

A macaroon entity declares an attenuable bearer token for the resource's records; see AshVault.Macaroon and Macaroons.

Summary

Functions

The ash_vault section definition.

Functions

sections()

@spec sections() :: [Spark.Dsl.Section.t()]

The ash_vault section definition.