Documentation
¶
Overview ¶
Package premium holds what the paid plan costs and where to buy it.
The dashboard has to state a price: a dialog that explains a paid feature and then sends someone away to find out what it costs is asking them to leave in order to be sold to. But a price is also the single most damaging thing to get wrong — a page that says $5 and a card that is charged $6 is how the first ten customers are lost.
It cannot be fetched, either: rule 4 means the dashboard makes no outbound calls, so the figure ships in the binary whatever we do.
So it lives here, once, and `TestPricingMatchesTheSite` in this package reads the site's own pricing file and fails when the two disagree. That turns "two copies that will drift" into "two copies that cannot drift silently" — the check runs in CI, where a mismatch is a red build rather than a support email.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plan ¶
type Plan struct {
// USD per month. For Yearly this is the yearly price divided by twelve —
// what the plan works out to, which is the number people compare.
PerMonthUSD float64 `json:"per_month_usd"`
// USD actually charged, per billing period.
ChargedUSD float64 `json:"charged_usd"`
// How often ChargedUSD is taken: "month" or "year".
Period string `json:"period"`
// The Stripe payment link. Opened in a new tab; never embedded.
URL string `json:"url"`
}
Plan is what a subscription costs and the Stripe link that sells it.