View Source Noizu.ElixirCore.CallerEntity (noizu_core v1.0.28)
The Noizu.ElixirCore.CallerEntity module provides a convenience structure for tracking API caller authentication levels. It supports the levels :internal, :restricted, :system, and :admin.
types
Types
t: A structure representing the CallerEntity with fieldsidentifierandvsn.
functions
Functions
Link to this section Summary
Functions
Noizu.ERP handler
Returns the CallerEntity as an entity struct. Raises an error if the conversion fails.
Returns the CallerEntity as an entity struct as an :ok tuple or raises an error if the conversion fails.
Returns the CallerEntity as an entity struct as an :ok tuple or the original object as an :error tuple.
Returns the identifier of the CallerEntity.
Returns the identifier of the CallerEntity as an :ok tuple or the original object as an :error tuple.
Noizu.ERP handler
Returns the CallerEntity as a record.
Returns the reference tuple for the CallerEntity.
Returns the reference tuple of the CallerEntity as an :ok tuple or the original object as an :error tuple.
Returns the string reference for the CallerEntity.
Returns the string reference of the CallerEntity as an :ok tuple or the original object as an :error tuple.
Link to this section Types
Link to this section Functions
Noizu.ERP handler
Returns the CallerEntity as an entity struct. Raises an error if the conversion fails.
examples
Examples
iex> Noizu.ElixirCore.CallerEntity.entity!(%Noizu.ElixirCore.CallerEntity{identifier: :system})
%Noizu.ElixirCore.CallerEntity{identifier: :system}
iex> Noizu.ElixirCore.CallerEntity.entity!({:ref, Noizu.ElixirCore.CallerEntity, :system})
%Noizu.ElixirCore.CallerEntity{identifier: :system}
iex> Noizu.ElixirCore.CallerEntity.entity!("ref.noizu-caller.system")
%Noizu.ElixirCore.CallerEntity{identifier: :system}
iex> Noizu.ElixirCore.CallerEntity.entity!(:system)
%Noizu.ElixirCore.CallerEntity{identifier: :system}Code Review
- The function could benefit from more detailed documentation.
Returns the CallerEntity as an entity struct as an :ok tuple or raises an error if the conversion fails.
examples
Examples
iex> Noizu.ElixirCore.CallerEntity.entity_ok!(%Noizu.ElixirCore.CallerEntity{identifier: :system})
{:ok, %Noizu.ElixirCore.CallerEntity{identifier: :system}}Code Review
- The function could benefit from more detailed documentation.
Returns the CallerEntity as an entity struct as an :ok tuple or the original object as an :error tuple.
examples
Examples
iex> Noizu.ElixirCore.CallerEntity.entity_ok(%Noizu.ElixirCore.CallerEntity{identifier: :system})
{:ok, %Noizu.ElixirCore.CallerEntity{identifier: :system}}Code Review
- The function could benefit from more detailed documentation.
Returns the identifier of the CallerEntity.
examples
Examples
iex> Noizu.ElixirCore.CallerEntity.id(%Noizu.ElixirCore.CallerEntity{identifier: :system})
:system
iex> Noizu.ElixirCore.CallerEntity.id({:ref, Noizu.ElixirCore.CallerEntity, :system})
:system
iex> Noizu.ElixirCore.CallerEntity.id("ref.noizu-caller.system")
:system
iex> Noizu.ElixirCore.CallerEntity.id(:system)
:systemCode Review
- The function could benefit from more detailed documentation.
Returns the identifier of the CallerEntity as an :ok tuple or the original object as an :error tuple.
examples
Examples
iex> Noizu.ElixirCore.CallerEntity.id_ok(%Noizu.ElixirCore.CallerEntity{identifier: :system})
{:ok, :system}Code Review
- The function could benefit from more detailed documentation.
Noizu.ERP handler
Returns the CallerEntity as a record.
examples
Examples
iex> Noizu.ElixirCore.CallerEntity.record(%Noizu.ElixirCore.CallerEntity{identifier: :system})
%Noizu.ElixirCore.CallerEntity{identifier: :system}
iex> Noizu.ElixirCore.CallerEntity.record({:ref, Noizu.ElixirCore.CallerEntity, :system})
%Noizu.ElixirCore.CallerEntity{identifier: :system}
iex> Noizu.ElixirCore.CallerEntity.record("ref.noizu-caller.system")
%Noizu.ElixirCore.CallerEntity{identifier: :system}
iex> Noizu.ElixirCore.CallerEntity.record(:system)
%Noizu.ElixirCore.CallerEntity{identifier: :system}Code Review
- The function could benefit from more detailed documentation.
Returns the reference tuple for the CallerEntity.
examples
Examples
iex> Noizu.ElixirCore.CallerEntity.ref(%Noizu.ElixirCore.CallerEntity{identifier: :system})
{:ref, Noizu.ElixirCore.CallerEntity, :system}
iex> Noizu.ElixirCore.CallerEntity.ref({:ref, Noizu.ElixirCore.CallerEntity, :system})
{:ref, Noizu.ElixirCore.CallerEntity, :system}
iex> Noizu.ElixirCore.CallerEntity.ref("ref.noizu-caller.system")
{:ref, Noizu.ElixirCore.CallerEntity, :system}
iex> Noizu.ElixirCore.CallerEntity.ref(:system)
{:ref, Noizu.ElixirCore.CallerEntity, :system}Code Review
- The function could benefit from more detailed documentation.
Returns the reference tuple of the CallerEntity as an :ok tuple or the original object as an :error tuple.
examples
Examples
iex> Noizu.ElixirCore.CallerEntity.ref_ok(%Noizu.ElixirCore.CallerEntity{identifier: :system})
{:ok, {:ref, Noizu.ElixirCore.CallerEntity, :system}}Code Review
- The function could benefit from more detailed documentation.
Returns the string reference for the CallerEntity.
examples
Examples
iex> Noizu.ElixirCore.CallerEntity.sref(%Noizu.ElixirCore.CallerEntity{identifier: :system})
"ref.noizu-caller.system"
iex> Noizu.ElixirCore.CallerEntity.sref({:ref, Noizu.ElixirCore.CallerEntity, :system})
"ref.noizu-caller.system"
iex> Noizu.ElixirCore.CallerEntity.sref("ref.noizu-caller.system")
"ref.noizu-caller.system"
iex> Noizu.ElixirCore.CallerEntity.sref(:system)
"ref.noizu-caller.system"Code Review
- The function could benefit from more detailed documentation.
Returns the string reference of the CallerEntity as an :ok tuple or the original object as an :error tuple.
examples
Examples
iex> Noizu.ElixirCore.CallerEntity.sref_ok(%Noizu.ElixirCore.CallerEntity{identifier: :system})
{:ok, "ref.noizu-caller.system"}Code Review
- The function could benefit from more detailed documentation.