Liking cljdoc? Tell your friends :D

boundary.tenant.core.tenant


can-delete-tenant?clj

(can-delete-tenant? tenant)

True if tenant is not already deleted.

True if tenant is not already deleted.
sourceraw docstring

create-tenant-decisionclj

(create-tenant-decision slug existing-slugs)

Decide whether a tenant with the given slug can be created. Returns {:valid? bool}.

Decide whether a tenant with the given slug can be created. Returns {:valid? bool}.
sourceraw docstring

prepare-tenantclj

(prepare-tenant {:keys [slug name settings]} tenant-id now)

Build a complete tenant entity from creation input, id, and timestamp.

Build a complete tenant entity from creation input, id, and timestamp.
sourceraw docstring

prepare-tenant-deletionclj

(prepare-tenant-deletion tenant now)

Mark tenant as deleted with :status :deleted and :deleted-at timestamp.

Mark tenant as deleted with :status :deleted and :deleted-at timestamp.
sourceraw docstring

prepare-tenant-updateclj

(prepare-tenant-update existing-tenant update-data now)

Merge approved update-data into existing-tenant with a fresh :updated-at.

Merge approved update-data into existing-tenant with a fresh :updated-at.
sourceraw docstring

slug->schema-nameclj

(slug->schema-name slug)

Convert tenant slug to database schema name (hyphens become underscores, prefixed with tenant_).

Convert tenant slug to database schema name (hyphens become underscores, prefixed with tenant_).
sourceraw docstring

tenant-active?clj

(tenant-active? tenant)

True if tenant is :active and not soft-deleted.

True if tenant is :active and not soft-deleted.
sourceraw docstring

tenant-deleted?clj

(tenant-deleted? tenant)

True if tenant status is :deleted or :deleted-at is set.

True if tenant status is :deleted or :deleted-at is set.
sourceraw docstring

tenant-suspended?clj

(tenant-suspended? tenant)

True if tenant status is :suspended.

True if tenant status is :suspended.
sourceraw docstring

update-tenant-decisionclj

(update-tenant-decision existing-tenant update-data)

Decide whether the proposed update-data is valid for existing-tenant.

Decide whether the proposed update-data is valid for existing-tenant.
sourceraw docstring

valid-schema-name?clj

(valid-schema-name? schema-name)

True if schema-name is a safe tenant schema identifier — exactly the shape slug->schema-name produces: a tenant_ prefix followed by lowercase alphanumerics and underscores, within PostgreSQL's 63-char identifier limit.

SQL identifiers cannot be parameterized, so schema names are interpolated into DDL. This predicate is the defense-in-depth guard callers apply at the DDL boundary before any interpolation.

True if schema-name is a safe tenant schema identifier — exactly the shape
slug->schema-name produces: a `tenant_` prefix followed by lowercase
alphanumerics and underscores, within PostgreSQL's 63-char identifier limit.

SQL identifiers cannot be parameterized, so schema names are interpolated
into DDL. This predicate is the defense-in-depth guard callers apply at the
DDL boundary before any interpolation.
sourceraw docstring

valid-slug?clj

(valid-slug? slug)

Check if slug is a valid tenant identifier (lowercase alphanumeric with hyphens, 2-100 chars).

Check if slug is a valid tenant identifier (lowercase alphanumeric with hyphens, 2-100 chars).
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