internal/

directory
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT

Directories

Path Synopsis
api
Package api provides the HTTP server and route wiring for Hardcount.
Package api provides the HTTP server and route wiring for Hardcount.
generated
Package generated provides primitives to interact with the openapi HTTP API.
Package generated provides primitives to interact with the openapi HTTP API.
middleware
Package middleware provides HTTP middleware for the Hardcount API server.
Package middleware provides HTTP middleware for the Hardcount API server.
timefilter
Package timefilter is the shared parser for ?from / ?to (and named variants like ?date_from / ?date_to) query parameters across operator-facing list and export endpoints.
Package timefilter is the shared parser for ?from / ?to (and named variants like ?date_from / ?date_to) query parameters across operator-facing list and export endpoints.
Package billing contains the billing cycle engine, scheduler, and invoice preview.
Package billing contains the billing cycle engine, scheduler, and invoice preview.
Package dashmembers implements the minimal team-membership surface (DP-readiness cut-reinstatement #2, 2026-07-06): invite by email, tokenized accept, member list, revoke, remove.
Package dashmembers implements the minimal team-membership surface (DP-readiness cut-reinstatement #2, 2026-07-06): invite by email, tokenized accept, member list, revoke, remove.
Code-adjacent data: the doctor's invariant catalog.
Code-adjacent data: the doctor's invariant catalog.
Package domain contains pure data models shared across Hardcount.
Package domain contains pure data models shared across Hardcount.
Package errs provides structured domain errors with machine-readable codes.
Package errs provides structured domain errors with machine-readable codes.
Package hostedinvoice serves the public /v1/public/invoices/* surface — Stripe's hosted_invoice_url equivalent.
Package hostedinvoice serves the public /v1/public/invoices/* surface — Stripe's hosted_invoice_url equivalent.
integrations
litellm
Package litellm adapts LiteLLM Proxy's StandardLoggingPayload to Hardcount usage events.
Package litellm adapts LiteLLM Proxy's StandardLoggingPayload to Hardcount usage events.
breaker
Package breaker provides a global circuit breaker around Stripe API calls, built on sony/gobreaker/v2.
Package breaker provides a global circuit breaker around Stripe API calls, built on sony/gobreaker/v2.
Package paymentmethods is the customer-facing view of payment methods.
Package paymentmethods is the customer-facing view of payment methods.
Package pdffonts embeds the TTF fonts used by Hardcount's PDF renderers (invoice, credit note).
Package pdffonts embeds the TTF fonts used by Hardcount's PDF renderers (invoice, credit note).
platform
activity
Package activity holds the shape of an activity line and the words that more than one activity surface shares (ADR-128).
Package activity holds the shape of an activity line and the words that more than one activity surface shares (ADR-128).
leader
Package leader is singleton-role leadership as a ROW, not a Postgres session (ADR-114).
Package leader is singleton-role leadership as a ROW, not a Postgres session (ADR-114).
leader/leadertest
Package leadertest lets store tests call leader-only methods with a real, live lease token without running a heartbeat: one admin statement takes the role for an hour and the token rides the returned ctx.
Package leadertest lets store tests call leader-only methods with a real, live lease token without running a heartbeat: one admin statement takes the role for an hour and the token rides the returned ctx.
migrate
Package migrate applies Hardcount's database migrations with goose (ADR-125).
Package migrate applies Hardcount's database migrations with goose (ADR-125).
money
Package money holds small, dependency-free helpers for integer-cents math shared across billing, subscription proration, and tax.
Package money holds small, dependency-free helpers for integer-cents math shared across billing, subscription proration, and tax.
scheduler
Package scheduler hosts the standard tick-loop runner used by every ticker-driven singleton worker in Hardcount.
Package scheduler hosts the standard tick-loop runner used by every ticker-driven singleton worker in Hardcount.
telemetry
Package telemetry provides OpenTelemetry tracing initialization for Hardcount.
Package telemetry provides OpenTelemetry tracing initialization for Hardcount.
timeline
Package timeline carries the two ordering invariants every activity / timeline surface must satisfy, mechanized after the same two bugs shipped on three separate surfaces each (2026-07-19 audit):
Package timeline carries the two ordering invariants every activity / timeline surface must satisfy, mechanized after the same two bugs shipped on three separate surfaces each (2026-07-19 audit):
Package recipe implements the pricing recipes feature: one-call instantiation of a ready-made catalog, meters and a plan with its prices, for AI-platform pricing patterns (ADR-085, ADR-130 §15).
Package recipe implements the pricing recipes feature: one-call instantiation of a ready-made catalog, meters and a plan with its prices, for AI-platform pricing patterns (ADR-085, ADR-130 §15).
Package session implements dashboard sessions minted by the email+password login flow.
Package session implements dashboard sessions minted by the email+password login flow.
subscriptiontest
Package subscriptiontest holds test-only fixtures for the subscription domain (the platform/leader/leadertest shape).
Package subscriptiontest holds test-only fixtures for the subscription domain (the platform/leader/leadertest shape).
Package tax defines the tenant-selectable tax calculation backend and three concrete implementations: NoneProvider (skip tax), ManualProvider (flat tenant-level rate), and StripeTaxProvider (Stripe Tax API; defers the invoice to tax_status=pending for retry on error).
Package tax defines the tenant-selectable tax calculation backend and three concrete implementations: NoneProvider (skip tax), ManualProvider (flat tenant-level rate), and StripeTaxProvider (Stripe Tax API; defers the invoice to tax_status=pending for retry on error).
Package testclock owns the TestClock resource: a tenant-scoped frozen-time simulator used to walk test-mode subscriptions through full billing lifecycles (trials, cycles, dunning retries) in compressed wall-clock time.
Package testclock owns the TestClock resource: a tenant-scoped frozen-time simulator used to walk test-mode subscriptions through full billing lifecycles (trials, cycles, dunning retries) in compressed wall-clock time.
pdftest
Package pdftest reads back what Hardcount's PDF renderers drew, for tests.
Package pdftest reads back what Hardcount's PDF renderers drew, for tests.
Provider cost rates + per-customer margin (ADR-079).
Provider cost rates + per-customer margin (ADR-079).
breachedpw
Package breachedpw holds the breached-password list that user.ValidatePassword checks when a password is set or reset (ADR-095, "Offline breached-password").
Package breachedpw holds the breached-password list that user.ValidatePassword checks when a password is set or reset (ADR-095, "Offline breached-password").
breachedpw/gen command
Command gen rebuilds internal/user/breachedpw/passwords.txt from a downloaded copy of the source list.
Command gen rebuilds internal/user/breachedpw/passwords.txt from a downloaded copy of the source list.
Package version carries the build-time version stamp.
Package version carries the build-time version stamp.

Jump to

Keyboard shortcuts

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