premium

package
v0.28.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: Apache-2.0 Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.

type Pricing

type Pricing struct {
	Yearly  Plan   `json:"yearly"`
	Monthly Plan   `json:"monthly"`
	InfoURL string `json:"info_url"`
}

Pricing is every way to buy, plus where to read more.

func Current

func Current() Pricing

Current is the live pricing. Changing anything here means changing caprock-web's src/content/pricing.ts in the same commit, and the test in this package is what enforces that.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL