basalt / tenancy/src / MemoryDomainStore
Class: MemoryDomainStore
Defined in: tenancy/src/custom-domains.ts:114
Implements
Constructors
Constructor
> new MemoryDomainStore(): MemoryDomainStore
Returns
MemoryDomainStore
Methods
add()
> add(domain): Promise<void>
Defined in: tenancy/src/custom-domains.ts:116
Insert a NEW domain. Must reject (throw) if the domain already exists — the uniqueness gate.
Parameters
domain
Returns
Promise<void>
Implementation of
forTenant()
> forTenant(tenantId): Promise<CustomDomain[]>
Defined in: tenancy/src/custom-domains.ts:127
Parameters
tenantId
string
Returns
Promise<CustomDomain[]>
Implementation of
get()
> get(domain): Promise<CustomDomain | null>
Defined in: tenancy/src/custom-domains.ts:123
Parameters
domain
string
Returns
Promise<CustomDomain | null>
Implementation of
listVerified()
> listVerified(): Promise<CustomDomain[]>
Defined in: tenancy/src/custom-domains.ts:147
Every verified domain, for CustomDomains.reverifyAll. Optional: without it, pass the domains to reverifyAll({ domains }) yourself.
Returns
Promise<CustomDomain[]>
Implementation of
markUnverified()
> markUnverified(domain): Promise<void>
Defined in: tenancy/src/custom-domains.ts:137
Parameters
domain
string
Returns
Promise<void>
Implementation of
markVerified()
> markVerified(domain, at): Promise<void>
Defined in: tenancy/src/custom-domains.ts:130
Parameters
domain
string
at
number
Returns
Promise<void>
Implementation of
remove()
> remove(domain): Promise<void>
Defined in: tenancy/src/custom-domains.ts:144
Parameters
domain
string
Returns
Promise<void>
Implementation of
replace()
> replace(expected, next): Promise<boolean>
Defined in: tenancy/src/custom-domains.ts:150
Atomically swap the record for expected.domain with next, but ONLY if the stored record is still expected (same tenant, token and verified flag). Returns false when the record changed underneath. Used to hand an expired or DNS-contested unverified claim to another tenant. Optional: without it the swap is a remove followed by an add, which a concurrent claim can race.
Parameters
expected
next
Returns
Promise<boolean>