Skip to content

About

A Go-first, machine-readable description of a product's pricing and packaging: the tiers of its ladder, the plans in them with their prices, the features (a switch or an ordered level) and limits each plan sets, one-time products, a marketplace fee, and the application access each tier grants.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

systemspec-pricingpackaging

Go CI Go Lint Go SAST Docs Docs Visualization License

A Go-first, machine-readable description of a product's pricing and packaging: the tiers of its ladder, the plans in them with their prices, the features (a switch or an ordered level) and limits each plan sets, one-time products, a marketplace fee, and the application access each tier grants.

The Spec is the source of truth. A pricing page, a limit check, a payment provider's prices and an account's entitlements are computed from it.

  • SPEC.md: the normative description of the model.
  • pricingspec: the Go types, a loader, validation (E001 to E014) and lint (W001 to W006).
  • schema: the JSON Schema generated from the types.
spec, err := pricingspec.Load(f)
if err != nil {
	return err // a *pricingspec.ValidationError lists every error
}
for _, w := range spec.Lint() {
	fmt.Println(w) // warnings for review
}

Helpers (plan, feature and limit checks) and projections (a pricing view, an entitlement map, a diff) are planned; see the roadmap.

Releases

v0.1.0 · Changelog

Regenerating the schema

go generate ./schema/...
schemakit lint --property-case camelCase schema/pricing.schema.json

About

A Go-first, machine-readable description of a product's pricing and packaging: the tiers of its ladder, the plans in them with their prices, the features (a switch or an ordered level) and limits each plan sets, one-time products, a marketplace fee, and the application access each tier grants.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages