package cloud // CloudBillingRecord 云账单同步记录(跨平台统一结构) // Logan.Li type CloudBillingRecord struct { BillingDate string `json:"billing_date"` Provider string `json:"provider"` Cost float64 `json:"cost"` Currency string `json:"currency"` Service string `json:"service"` Region string `json:"region"` Description string `json:"description"` } // BillingFetcher 云账单拉取接口 type BillingFetcher interface { FetchDailyBill(billingDate string) ([]CloudBillingRecord, error) } // NewBillingFetcher 根据云厂商创建账单拉取器 func NewBillingFetcher(provider, accessKey, secretKey string) BillingFetcher { switch provider { case "aliyun": if p := NewAliyunProvider(accessKey, secretKey); p != nil { return p } } return nil }