Tenant module
Source: modules/tenant/ (ce module); the tenant-create licence gates live in this repo’s modules/tenant/.
At a glance
Section titled “At a glance”| CLI | shc tenant |
| Subcommands | 5 |
| HTTP endpoints | see the route reference |
| Events emitted | — |
| Error codes | see the error code reference |
| Service classes | TenantService |
| Cross-module deps | app, network |
Source layout
Section titled “Source layout”modules/tenant/├── command.go├── router.go├── service.go├── types.go└── commands/CLI entry points
Section titled “CLI entry points”shc tenant— manage tenants
HTTP API
Section titled “HTTP API”Routes are listed in the generated route reference; request/response notes live in the API reference.
Responsibilities
Section titled “Responsibilities”The tenant module owns tenant CRUD — the top-level multi-tenancy
boundary in SHC. A tenant is a logical namespace that owns
environments, which own stacks. TenantService handles create, list,
get, update, delete; it validates uniqueness and enforces that tenants
can only be removed when empty.
The CLI (shc tenant) and HTTP API (/api/method/shc.tenant.*) are
both thin wrappers over the service. Quota enforcement per tenant
lives in quota; config cascade per tenant lives in
config.
shc@docs:~$