View Source Ash (ash v1.53.2)

General purpose tools for working with Ash.

Currently only contains setters/getters for process context.

Link to this section Summary

Functions

Gets the current actor from the process dictionary

Gets the current authorize? from the process dictionary

Gets the current context from the process dictionary

Gets all of the ash context so it can be set into a new process.

Gets the current tenant from the process dictionary

Sets actor into the process dictionary that is used for all changesets and queries.

Sets authorize? into the process dictionary that is used for all changesets and queries.

Sets context into the process dictionary that is used for all changesets and queries.

Sets tenant into the process dictionary that is used for all changesets and queries.

Link to this section Functions

@spec get_actor() :: term()

Gets the current actor from the process dictionary

@spec get_authorize?() :: term()

Gets the current authorize? from the process dictionary

@spec get_context() :: term()

Gets the current context from the process dictionary

Link to this function

get_context_for_transfer()

View Source
@spec get_context_for_transfer() :: term()

Gets all of the ash context so it can be set into a new process.

Use transfer_context/1 in the new process to set the context.

@spec get_tenant() :: term()

Gets the current tenant from the process dictionary

@spec set_actor(map()) :: :ok

Sets actor into the process dictionary that is used for all changesets and queries.

@spec set_authorize?(map()) :: :ok

Sets authorize? into the process dictionary that is used for all changesets and queries.

@spec set_context(map()) :: :ok

Sets context into the process dictionary that is used for all changesets and queries.

@spec set_tenant(map()) :: :ok

Sets tenant into the process dictionary that is used for all changesets and queries.

@spec transfer_context(term()) :: :ok