Liking cljdoc? Tell your friends :D

wagoe.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 the global admin role (BOU-568).

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 the global admin role (BOU-568).
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 tenants, newest first, as a JSON array like the membership list.

Query params:

  • limit: Number of results (default 20, max 100)
  • offset: Pagination offset (default 0)
  • status: Filter by status (active, suspended)
  • search: Match against name or slug
List tenants, newest first, as a JSON array like the membership list.

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

provision-tenant-handlerclj

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

Provision tenant database schema.

Creates the tenant's PostgreSQL schema and its tables. Idempotent. Any other database answers 501.

Provision tenant database schema.

Creates the tenant's PostgreSQL schema and its tables. Idempotent. Any other
database answers 501.
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-routesclj

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

This module's contribution to the route table: Reitit route data under :api, at paths relative to /api/v1. Every route requires the admin role.

This module's contribution to the route table: Reitit route data under
:api, at paths relative to /api/v1. Every route requires the admin role.
sourceraw docstring

update-tenant-handlerclj

(update-tenant-handler tenant-service)

Update a tenant's name or status.

The slug names the tenant's schema, so it cannot change; sending the current one is accepted.

Update a tenant's name or status.

The slug names the tenant's schema, so it cannot change; sending the
current one is accepted.
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