fix: gofmt formatting across all Go source files

This commit is contained in:
erio
2026-04-14 07:43:08 +08:00
parent 9e0d12d3b0
commit 1e6912ea2e
18 changed files with 143 additions and 84 deletions

View File

@@ -100,9 +100,22 @@ func valueOrZero(v *int64) int64 {
return *v
}
// AccountQuotaState holds the post-increment quota state returned by the DB transaction.
// All values are post-update (i.e., already include the increment).
type AccountQuotaState struct {
TotalUsed float64
TotalLimit float64
DailyUsed float64
DailyLimit float64
WeeklyUsed float64
WeeklyLimit float64
}
type UsageBillingApplyResult struct {
Applied bool
APIKeyQuotaExhausted bool
NewBalance *float64 // post-deduction balance (nil = no balance deduction)
QuotaState *AccountQuotaState // post-increment quota state (nil = no quota increment)
}
type UsageBillingRepository interface {