Spear.User (Spear v0.9.0) View Source
A struct representing an EventStoreDB user
These are returned from Spear.user_details/3.
Link to this section Summary
Link to this section Types
Specs
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"
}}