udia v0.1.3 Udia.Accounts View Source
The boundary for the Accounts system.
Link to this section Summary
Functions
Creates a user
Deletes a User
Gets a single user
Gets a single user
Returns the list of users
Updates a user (only allow change password)
Link to this section Functions
Creates a user.
Examples
iex> create_user(%{field: value})
{:ok, %User{}}
iex> create_user(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Deletes a User.
Examples
iex> delete_user(user)
{:ok, %User{}}
iex> delete_user(user)
{:error, %Ecto.Changeset{}}
Gets a single user.
Raises Ecto.NoResultsError
if the User does not exist.
Examples
iex> get_user!(123)
%User{}
iex> get_user!(456)
** (Ecto.NoResultsError)
Gets a single user.
Raises Ecto.NoResultsError
if the User does not exist.
Examples
iex> get_user_by_username!("alice")
%User{}
iex> get_user_by_username!("bob")
** (Ecto.NoResultsError)