JetPluginSDK.TenantMan.Storage (JetPluginSDK v0.2.1)

The source of truth for tenant data.

Summary

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

fetch(tenant_module, tenant_id)

@spec fetch(tenant_module(), tenant_id()) :: {:ok, tenant()} | :error

fetch!(tenant_module, tenant_id)

@spec fetch!(tenant_module(), tenant_id()) :: tenant()

insert(tenant_module, tenant)

@spec insert(tenant_module(), tenant()) :: {:ok, pid()} | {:error, :already_exists}

start_link(args)

@spec start_link(args :: [{:tenant_module, tenant_module()}]) :: GenServer.on_start()

storage_name(tenant_module)

@spec storage_name(tenant_module()) :: atom()

update!(tenant_module, tenant)

@spec update!(tenant_module(), tenant()) :: :ok