Liking cljdoc? Tell your friends :D

boundary.tenant.shell.http

HTTP routes and handlers for tenant management.

Provides REST API endpoints for:

  • Tenant CRUD operations (list, get, create, update, delete)
  • Tenant provisioning (schema creation, data seeding)
  • Tenant activation/suspension

All routes require admin authentication (to be integrated with auth system).

HTTP routes and handlers for tenant management.

Provides REST API endpoints for:
- Tenant CRUD operations (list, get, create, update, delete)
- Tenant provisioning (schema creation, data seeding)
- Tenant activation/suspension

All routes require admin authentication (to be integrated with auth system).
raw docstring

activate-tenant-handlerclj

(activate-tenant-handler tenant-service)

Activate suspended tenant.

Activate suspended tenant.
sourceraw docstring

create-tenant-handlerclj

(create-tenant-handler tenant-service)

Create new tenant.

Request body:

  • name: Tenant display name (required)
  • slug: Tenant slug for URLs (required, unique)
  • status: Initial status (:active or :suspended, default :active)
Create new tenant.

Request body:
- name: Tenant display name (required)
- slug: Tenant slug for URLs (required, unique)
- status: Initial status (:active or :suspended, default :active)
sourceraw docstring

delete-tenant-handlerclj

(delete-tenant-handler tenant-service)

Delete tenant (soft delete).

This marks the tenant as deleted but preserves data for audit purposes.

Delete tenant (soft delete).

This marks the tenant as deleted but preserves data for audit purposes.
sourceraw docstring

get-tenant-handlerclj

(get-tenant-handler tenant-service)

Get tenant by ID.

Get tenant by ID.
sourceraw docstring

list-tenants-handlerclj

(list-tenants-handler tenant-service)

List all tenants with optional filtering and pagination.

Query params:

  • limit: Number of results (default 20, max 100)
  • offset: Pagination offset (default 0)
  • status: Filter by status (:active, :suspended)
  • search: Search by name or slug
List all tenants with optional filtering and pagination.

Query params:
- limit: Number of results (default 20, max 100)
- offset: Pagination offset (default 0)
- status: Filter by status (:active, :suspended)
- search: Search by name or slug
sourceraw docstring

provision-tenant-handlerclj

(provision-tenant-handler tenant-service db-context)

Provision tenant database schema and initial data.

This creates:

  • PostgreSQL schema for tenant
  • Initial database tables (copies structure from public schema)

Note: Only works with PostgreSQL multi-tenant setup. Provisioning is idempotent - safe to call multiple times.

Provision tenant database schema and initial data.

This creates:
- PostgreSQL schema for tenant
- Initial database tables (copies structure from public schema)

Note: Only works with PostgreSQL multi-tenant setup.
Provisioning is idempotent - safe to call multiple times.
sourceraw docstring

suspend-tenant-handlerclj

(suspend-tenant-handler tenant-service)

Suspend tenant (prevents login and access).

Suspend tenant (prevents login and access).
sourceraw docstring

tenant-routes-normalizedclj

(tenant-routes-normalized tenant-service db-context _config)

Create tenant management routes in normalized format for composition.

Args: tenant-service: ITenantService implementation db-context: Database context (required for provisioning) config: Configuration map (reserved for future use)

Returns: Map with :api key containing route definitions

Route structure: {:api [...]} ; API routes under /api/v1/tenants

All routes require admin authentication (to be integrated).

Create tenant management routes in normalized format for composition.

Args:
  tenant-service: ITenantService implementation
  db-context: Database context (required for provisioning)
  config: Configuration map (reserved for future use)

Returns:
  Map with :api key containing route definitions

Route structure:
  {:api [...]}  ; API routes under /api/v1/tenants

All routes require admin authentication (to be integrated).
sourceraw docstring

update-tenant-handlerclj

(update-tenant-handler tenant-service)

Update existing tenant.

Request body:

  • name: New display name (optional)
  • slug: New slug (optional, must be unique)
  • status: New status (optional)
Update existing tenant.

Request body:
- name: New display name (optional)
- slug: New slug (optional, must be unique)
- status: New status (optional)
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close