View Source Spear.User (Spear v1.4.0)

A struct representing an EventStoreDB user

These are returned from Spear.user_details/3.

Link to this section Summary

Types

t()

A struct representing an EventStoreDB user

Link to this section Types

@type t() :: %Spear.User{
  enabled?: boolean(),
  full_name: String.t(),
  groups: [String.t()],
  last_updated: DateTime.t(),
  login_name: String.t()
}

A struct representing an EventStoreDB user

The :enabled? flag controls whether or not a user may execute requests, even with valid login information. This can be used to temporarily disable a user as an alternative to deleting the user altogether.

examples

Examples

iex> Spear.create_user(conn, "Aladdin", "aladdin", "open sesame", ["$ops"])
:ok
iex> Spear.user_details(conn, "aladdin")
{:ok,
 %Spear.User{
   enabled?: true,
   full_name: "Aladdin",
   groups: ["$ops"],
   last_updated: ~U[2021-04-18 16:48:38.583313Z],
   login_name: "aladdin"
 }}

Link to this section Functions