View Source Boruta.Ecto.Admin.Clients (Boruta core v2.3.3)
Boruta.Ecto.Client
resource administration
Summary
Functions
Creates a client.
Deletes a Client.
Gets a single client.
Returns the list of clients.
Regenerates client key pair. If a couple public/private key is provided as parameter, updates it.
Regenerates client secret. If a secret is provided as parameter, updates it.
Updates a client.
Functions
Creates a client.
Examples
iex> create_client(%{field: value})
{:ok, %Client{}}
iex> create_client(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Deletes a Client.
Examples
iex> delete_client(client)
{:ok, %Client{}}
iex> delete_client(client)
{:error, %Ecto.Changeset{}}
Gets a single client.
Raises Ecto.NoResultsError
if the Client does not exist.
Examples
iex> get_client!(123)
%Client{}
iex> get_client!(456)
** (Ecto.NoResultsError)
Returns the list of clients.
Examples
iex> list_clients()
[%Client{}, ...]
Link to this function
regenerate_client_key_pair(client, public_key \\ nil, private_key \\ nil)
View SourceRegenerates client key pair. If a couple public/private key is provided as parameter, updates it.
Examples
iex> regenerate_client_key_pair(client)
{:ok, %Client{}}
Regenerates client secret. If a secret is provided as parameter, updates it.
Examples
iex> regenerate_client_secret(client)
{:ok, %Client{}}
Updates a client.
Examples
iex> update_client(client, %{field: new_value})
{:ok, %Client{}}
iex> update_client(client, %{field: bad_value})
{:error, %Ecto.Changeset{}}