View Source Ash (ash v2.9.20)
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
Gets the current tracer
Deep merges context into the process dictionary that is used for all changesets and queries.
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.
Sets the tracer into the process dictionary that will be used to trace requests
Updates the context 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
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 get_tracer() :: term()
Gets the current tracer
@spec merge_context(map()) :: :ok
Deep merges context into the process dictionary that is used for all changesets and queries.
@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.
In Ash 3.0, this will be updated to deep merge
@spec set_tenant(String.t()) :: :ok
Sets tenant into the process dictionary that is used for all changesets and queries.
@spec set_tracer(module()) :: :ok
Sets the tracer into the process dictionary that will be used to trace requests
Updates the context into the process dictionary that is used for all changesets and queries.