Storage interface for SCIM resources using configurable adapters.
This module provides a unified interface for storing and retrieving Users and Groups.
The actual storage implementation is configurable via the :storage_strategy config.
Configuration
config :ex_scim, storage_strategy: MyApp.CustomStorageExamples
iex> ExScim.Storage.adapter()
ExScim.Storage.EtsStorage
Summary
Functions
Returns the configured storage adapter module.
Creates a new group. Returns {:ok, group} or {:error, reason}.
Creates a new user with the provided data.
Deletes a group by ID. Returns :ok or {:error, reason}.
Deletes a user by ID. Returns :ok or {:error, reason}.
Retrieves a group by ID. Returns {:ok, group} or {:error, :not_found}.
Retrieves a user by ID.
Returns true if a group with the given ID exists.
Lists groups matching the given filter, sort, and pagination options.
Lists users matching the given filter, sort, and pagination options.
Fully replaces an existing group. Returns {:ok, group} or {:error, reason}.
Fully replaces an existing user. Returns {:ok, user} or {:error, reason}.
Partially updates an existing group. Returns {:ok, group} or {:error, reason}.
Partially updates an existing user. Returns {:ok, user} or {:error, reason}.
Returns true if a user with the given ID exists.
Functions
Returns the configured storage adapter module.
Examples
iex> ExScim.Storage.adapter()
ExScim.Storage.EtsStorage
Creates a new group. Returns {:ok, group} or {:error, reason}.
Creates a new user with the provided data.
Deletes a group by ID. Returns :ok or {:error, reason}.
Deletes a user by ID. Returns :ok or {:error, reason}.
Retrieves a group by ID. Returns {:ok, group} or {:error, :not_found}.
Retrieves a user by ID.
Examples
iex> ExScim.Storage.get_user("123")
{:ok, %{"id" => "123", "userName" => "john"}}
iex> ExScim.Storage.get_user("nonexistent")
{:error, :not_found}
Returns true if a group with the given ID exists.
Lists groups matching the given filter, sort, and pagination options.
Returns {:ok, groups, total_count}.
Lists users matching the given filter, sort, and pagination options.
Returns {:ok, users, total_count} where total_count is the total number
of matching users before pagination.
Fully replaces an existing group. Returns {:ok, group} or {:error, reason}.
Fully replaces an existing user. Returns {:ok, user} or {:error, reason}.
Partially updates an existing group. Returns {:ok, group} or {:error, reason}.
Partially updates an existing user. Returns {:ok, user} or {:error, reason}.
Returns true if a user with the given ID exists.