Documentation
¶
Overview ¶
Package main implements commerce-grant — a CLI for manually granting subscriptions to users (e.g. gifting a Pro plan to a beta tester).
Usage:
commerce-grant --email hunter@example.com --plan world-pro commerce-grant --email hunter@example.com --plan world-pro --months 6 --reason "beta gift"
Auth: pulls the IAM admin client-id/secret and the commerce service token from environment variables (or, in production, from KMS under project hanzo-commerce / path /admin/grant-token). No user-visible UI.
The CLI talks to the same datastore commerce uses at runtime. It calls commerce.App.Bootstrap() to wire the DB, IAM middleware, and KMS client, then invokes billing/grant.Grant() directly. This keeps the grant path tested end-to-end without needing an HTTP server.
Click to show internal directories.
Click to hide internal directories.