Mailglass.Operator.Tenants (Mailglass v1.8.0)

Copy Markdown View Source

Tenant-scoped read model for operator tenant selector choices.

Summary

Functions

Lists distinct tenant ids visible to the given operator context.

Types

context()

@type context() :: map() | keyword() | term()

tenant_row()

@type tenant_row() :: %{id: String.t(), label: String.t()}

Functions

list_tenants(context, opts \\ [])

@spec list_tenants(
  context(),
  keyword()
) :: [tenant_row()]

Lists distinct tenant ids visible to the given operator context.

The projection is intentionally small: shell selectors only need an id and display label, and labels are currently the tenant ids themselves.