package usage // CensusAccount is one account's existence-count on one day. type CensusAccount struct { Apps int `json:"apps"` Routes int `json:"routes"` } // CensusDay is usage/census/.json — the whole deployment's per-account // counts, snapshotted once per UTC day by the console's economics pass so // existence-metering has history even though the registry holds only live // state. type CensusDay struct { V int `json:"v"` // 1 Date string `json:"date"` Accounts map[string]CensusAccount `json:"accounts"` // account name ("" normalized to "ops") } // CensusDayKey is the bucket key for a day's census. func CensusDayKey(date string) string { return "usage/census/" + date + ".json" } // CensusPrefix is the List prefix for census days. const CensusPrefix = "usage/census/"