1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
// Copyright 2025 OpenObserve Inc.
// SPDX-License-Identifier: AGPL-3.0
//! # Cloud Billing SDK
//!
//! A comprehensive Rust library for managing multi-cloud billing and account management.
//!
//! ## Supported Cloud Providers
//!
//! Each provider is behind a feature flag for modular compilation:
//!
//! - **Aliyun (Alibaba Cloud)** - feature: `aliyun` - Full support
//! - **Tencent Cloud** - feature: `tencentcloud` - Full support
//! - **AWS** - feature: `aws` - Full support via Cost Explorer API
//! - **Volcengine** - feature: `volcengine` - Full support
//! - **UCloud** - feature: `ucloud` - Partial support
//! - **Azure** - feature: `azure` - Planned
//!
//! ## Feature Flags
//!
//! ### Cloud Providers (modular)
//! - `aliyun` - Alibaba Cloud billing support
//! - `tencentcloud` - Tencent Cloud billing support
//! - `aws` - AWS Cost Explorer support
//! - `volcengine` - Volcengine billing support
//! - `ucloud` - UCloud billing support
//! - `all-providers` - Enable all cloud providers
//!
//! ### Database Support (optional)
//! - `db-postgres` - PostgreSQL database support
//! - `db-sqlite` - SQLite database support
//!
//! ### Convenience Features
//! - `full` - All providers + PostgreSQL
//! - `full-sqlite` - All providers + SQLite
//!
//! ### Default Features
//! By default, all cloud providers are enabled but no database backend.
//!
//! ## Core Features
//!
//! - 🔄 Direct cloud provider API integration
//! - 👥 Multi-account support per provider
//! - 📊 Bill aggregation and analysis
//! - 📈 Cost trending and comparison
//! - 💾 Optional database persistence (PostgreSQL or SQLite)
//! - 🔍 Query billing data by cycle, provider, and account
//!
//! ## Quick Start
//!
//! ### Basic Usage (without database)
//!
//! ```toml
//! [dependencies]
//! cbilling = { version = "0.1", features = ["aliyun"] }
//! ```
//!
//! ```rust,no_run
//! # #[cfg(feature = "aliyun")]
//! use cbilling::providers::aliyun::AliyunBillingClient;
//! use cbilling::error::Result;
//!
//! #[tokio::main]
//! async fn main() -> Result<()> {
//! # #[cfg(feature = "aliyun")]
//! # {
//! // Create Aliyun billing client
//! let client = AliyunBillingClient::new(
//! "your_access_key_id".to_string(),
//! "your_access_key_secret".to_string(),
//! );
//!
//! // Query billing data for a specific month
//! let billing_cycle = "2025-03";
//! let response = client.query_instance_bill(billing_cycle, None, None, None).await?;
//!
//! println!("Billing data: {:?}", response);
//! # }
//! Ok(())
//! }
//! ```
//!
//! ### With Database Support
//!
//! ```toml
//! [dependencies]
//! # PostgreSQL
//! cbilling = { version = "0.1", features = ["aliyun", "db-postgres"] }
//! # Or SQLite
//! cbilling = { version = "0.1", features = ["aliyun", "db-sqlite"] }
//! # Or all providers with PostgreSQL
//! cbilling = { version = "0.1", features = ["full"] }
//! ```
// Temporarily allow missing docs during development
// Core modules
// Re-exports for convenience
pub use ;
pub use ;
/// Library version
pub const VERSION: &str = env!;
/// Initialize the billing library
///
/// This function should be called once at the start of your application.
/// It initializes the cloud provider registry and sets up logging.
pub async