chore: add day wise usage breakdown (#4648)

This commit is contained in:
Srikanth Chekuri 2024-03-12 22:45:31 +05:30 committed by GitHub
parent adef0a4138
commit a42176599f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,6 +12,20 @@ import (
"go.uber.org/zap" "go.uber.org/zap"
) )
type DayWiseBreakdown struct {
Type string `json:"type"`
Breakdown []DayWiseData `json:"breakdown"`
}
type DayWiseData struct {
Timestamp int64 `json:"timestamp"`
Count float64 `json:"count"`
Size float64 `json:"size"`
UnitPrice float64 `json:"unitPrice"`
Quantity float64 `json:"quantity"`
Total float64 `json:"total"`
}
type tierBreakdown struct { type tierBreakdown struct {
UnitPrice float64 `json:"unitPrice"` UnitPrice float64 `json:"unitPrice"`
Quantity float64 `json:"quantity"` Quantity float64 `json:"quantity"`
@ -24,6 +38,7 @@ type usageResponse struct {
Type string `json:"type"` Type string `json:"type"`
Unit string `json:"unit"` Unit string `json:"unit"`
Tiers []tierBreakdown `json:"tiers"` Tiers []tierBreakdown `json:"tiers"`
DayWiseBreakdown DayWiseBreakdown `json:"dayWiseBreakdown"`
} }
type details struct { type details struct {