Expand description
The single source of truth for what each [SubscriptionTier] allows.
Everything a tier permits lives in the TIERS table below: the request
budget the rate limiter enforces, the resource caps the tenant tier limits
middleware enforces, whether a tenant may set its own name and logo, and the
commercial facts (price, SLA, support response) the pricing page publishes.
Nothing else in the workspace should hardcode a per-tier number. The server’s
subscription_limits modules read this table, and
cargo run subscription export writes it to the website as JSON so the
published prices cannot drift from the enforced limits.
Modules§
- export
- Serializes
crate::TIERSfor the website’s pricing page.
Structs§
- Operation
Points - What one request costs against a tier’s daily budget.
- Tier
Limits - Everything one subscription tier allows, and how it is sold.
Enums§
- Request
Budget - A tier’s daily request budget, in
OPERATION_POINTS. - Resource
Limit - How many resources of one type a tenant may store.
Constants§
- DEFAULT_
TIER - The tier every hosted signup starts on.
- OPERATION_
POINTS - The cost of each kind of request, in budget points.
- TIERS
- Every tier, in the order the pricing page presents them.
Functions§
- allows_
tenant_ customization - Whether a tier may set a tenant display name and logo.
- limits_
for - The limits for a tier.
- resource_
limit_ for - The cap on one resource type for a tier, or
ResourceLimit::Unlimitedfor the types a tier does not cap individually.