Documentation
¶
Index ¶
Constants ¶
View Source
const ( // TenantHeaderName is the request header carrying the tenant identifier. TenantHeaderName = "x-tenant-id" MaxTenantIDLength = 64 TenantIDPattern = `^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$` TenantIDHint = "x-tenant-id must match " + TenantIDPattern )
Variables ¶
This section is empty.
Functions ¶
func ResolveTenant ¶
func ResolveTenant(l logger.Interface) gin.HandlerFunc
ResolveTenant resolves, validates, and logs the request tenant. An absent header yields the empty tenant, which is what existing single-tenant rows are stored under. JWT claim resolution can replace the header lookup here without changing handler or use-case interfaces.
func ValidTenantID ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.