View Source AshCloak.Info (ash_cloak v0.1.2)

Introspection functions for the AshCloak extension.

Summary

Functions

The attribute or attributes to encrypt. The attribute will be renamed to encrypted_{attribute}, and a calculation with the same name will be added.

The attribute or attributes to encrypt. The attribute will be renamed to encrypted_{attribute}, and a calculation with the same name will be added.

A list of attributes that should be decrypted (their calculation should be loaded) by default.

A list of attributes that should be decrypted (their calculation should be loaded) by default.

A function to call when decrypting any value. Takes the resource, field, records, and calculation context. Must return :ok or {:error, error}

A function to call when decrypting any value. Takes the resource, field, records, and calculation context. Must return :ok or {:error, error}

cloak DSL options

The vault to use to encrypt & decrypt the value

The vault to use to encrypt & decrypt the value

Functions

Link to this function

cloak_attributes(dsl_or_extended)

View Source
@spec cloak_attributes(dsl_or_extended :: module() | map()) ::
  {:ok, [atom()]} | :error

The attribute or attributes to encrypt. The attribute will be renamed to encrypted_{attribute}, and a calculation with the same name will be added.

Link to this function

cloak_attributes!(dsl_or_extended)

View Source
@spec cloak_attributes!(dsl_or_extended :: module() | map()) :: [atom()] | no_return()

The attribute or attributes to encrypt. The attribute will be renamed to encrypted_{attribute}, and a calculation with the same name will be added.

Link to this function

cloak_decrypt_by_default(dsl_or_extended)

View Source
@spec cloak_decrypt_by_default(dsl_or_extended :: module() | map()) ::
  {:ok, [atom()]} | :error

A list of attributes that should be decrypted (their calculation should be loaded) by default.

Link to this function

cloak_decrypt_by_default!(dsl_or_extended)

View Source
@spec cloak_decrypt_by_default!(dsl_or_extended :: module() | map()) ::
  [atom()] | no_return()

A list of attributes that should be decrypted (their calculation should be loaded) by default.

Link to this function

cloak_on_decrypt(dsl_or_extended)

View Source
@spec cloak_on_decrypt(dsl_or_extended :: module() | map()) ::
  {:ok, (any(), any(), any(), any() -> any()) | mfa()} | :error

A function to call when decrypting any value. Takes the resource, field, records, and calculation context. Must return :ok or {:error, error}

Link to this function

cloak_on_decrypt!(dsl_or_extended)

View Source
@spec cloak_on_decrypt!(dsl_or_extended :: module() | map()) ::
  ((any(), any(), any(), any() -> any()) | mfa()) | no_return()

A function to call when decrypting any value. Takes the resource, field, records, and calculation context. Must return :ok or {:error, error}

Link to this function

cloak_options(dsl_or_extended)

View Source
@spec cloak_options(dsl_or_extended :: module() | map()) :: %{
  required(atom()) => any()
}

cloak DSL options

Returns a map containing the and any configured or default values.

Link to this function

cloak_vault(dsl_or_extended)

View Source
@spec cloak_vault(dsl_or_extended :: module() | map()) :: {:ok, module()} | :error

The vault to use to encrypt & decrypt the value

Link to this function

cloak_vault!(dsl_or_extended)

View Source
@spec cloak_vault!(dsl_or_extended :: module() | map()) :: module() | no_return()

The vault to use to encrypt & decrypt the value