Documentation
¶
Overview ¶
Package billing contains credit pricing and usage ledger helpers.
Index ¶
- func PartsForDebit(includedCredits int64, usedCredits int64, delta int64) (includedDebited int64, overageDebited int64)
- func PricedCredits(base int64, multiplierBps int64) int64
- func TypeFromParts(includedDebited int64, overageDebited int64) string
- func UsageLedgerEntryID(instanceSlug string, month string, requestID string, module string, ...) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PartsForDebit ¶
func PartsForDebit(includedCredits int64, usedCredits int64, delta int64) (includedDebited int64, overageDebited int64)
PartsForDebit splits a debit into included and overage portions.
func PricedCredits ¶
PricedCredits applies a per-instance pricing multiplier (basis points) to a base credit cost. It ceils the result to avoid systematic undercharging.
func TypeFromParts ¶
TypeFromParts determines the billing type based on included and overage portions.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.