View Source Spear.User (Spear v1.4.1)

A struct representing an EventStoreDB user

These are returned from Spear.user_details/3.

Summary

Types

t()

A struct representing an EventStoreDB user

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

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"
 }}

Functions

Link to this function

from_details_resp(arg)

View Source (since 0.3.0)