MCPcopy Create free account
hub / github.com/PostHog/duckgres / registerBillingAPI

Function registerBillingAPI

controlplane/compute_billing_api.go:32–36  ·  view source on GitHub ↗

registerBillingAPI mounts the billing pull API on an authenticated route group. The caller passes the admin-gating middleware (the billing service authenticates with the internal secret, which resolves to admin).

(r gin.IRouter, store billingUsageStore, requireAdmin gin.HandlerFunc)

Source from the content-addressed store, hash-verified

30 now func() time.Time
31}
32
33// registerBillingAPI mounts the billing pull API on an authenticated route
34// group. The caller passes the admin-gating middleware (the billing service
35// authenticates with the internal secret, which resolves to admin).
36func registerBillingAPI(r gin.IRouter, store billingUsageStore, requireAdmin gin.HandlerFunc) {
37 h := &billingAPIHandler{store: store, now: time.Now}
38 // gzip on the usage read: rows scale with total adoption (one per
39 // storage-holding org per day, several per compute-active org) and the

Callers 2

SetupMultiTenantFunction · 0.85

Calls

no outgoing calls

Tested by 1