1#[derive(Debug, Clone)]
12pub struct AirClientType;
13
14#[derive(Debug, Clone)]
16pub struct UpdateCheckRequest {
17 pub request_id:String,
18 pub current_version:String,
19 pub channel:String,
20}
21
22#[derive(Debug, Clone)]
23pub struct DownloadRequest {
24 pub request_id:String,
25 pub url:String,
26 pub destination_path:String,
27 pub checksum:String,
28 pub headers:std::collections::HashMap<String, String>,
29}
30
31#[derive(Debug, Clone)]
32pub struct ApplyUpdateRequest {
33 pub request_id:String,
34 pub update_id:String,
35 pub update_path:String,
36}
37
38#[derive(Debug, Clone)]
39pub struct AuthenticationRequest {
40 pub request_id:String,
41 pub provider:String,
42 pub credentials:serde_json::Value,
43}
44
45#[derive(Debug, Clone)]
46pub struct IndexRequest {
47 pub request_id:String,
48 pub paths:Vec<String>,
49 pub recursive:bool,
50}
51
52#[derive(Debug, Clone)]
53pub struct SearchRequest {
54 pub request_id:String,
55 pub query:String,
56 pub file_patterns:Vec<String>,
57 pub max_results:u32,
58}
59
60#[derive(Debug, Clone)]
61pub struct StatusRequest {
62 pub request_id:String,
63}
64
65#[derive(Debug, Clone)]
66pub struct MetricsRequest {
67 pub request_id:String,
68 pub metric_type:Option<String>,
69}
70
71#[derive(Debug, Clone)]
73pub struct UpdateCheckResponse {
74 pub update_available:bool,
75 pub version:String,
76 pub download_url:String,
77 pub release_notes:String,
78 pub error:String,
79}
80
81#[derive(Debug, Clone)]
82pub struct DownloadFileResponse {
83 pub success:bool,
84 pub file_path:String,
85 pub file_size:u64,
86 pub checksum:String,
87 pub error:String,
88}
89
90#[derive(Debug, Clone)]
91pub struct ApplyUpdateResponse {
92 pub success:bool,
93 pub error:String,
94}
95
96#[derive(Debug, Clone)]
97pub struct AuthenticationResponse {
98 pub success:bool,
99 pub token:String,
100 pub error:String,
101}
102
103#[derive(Debug, Clone)]
104pub struct IndexFilesResponse {
105 pub success:bool,
106 pub files_indexed:u32,
107 pub total_size:u64,
108 pub error:String,
109}
110
111#[derive(Debug, Clone)]
112pub struct SearchFilesResponse {
113 pub results:Vec<FileResultProtoDTO>,
114 pub total_results:u32,
115 pub error:String,
116}
117
118#[derive(Debug, Clone)]
119pub struct FileResultProtoDTO {
120 pub path:String,
121 pub size:u64,
122 pub line:Option<u32>,
123 pub content:Option<String>,
124}
125
126#[derive(Debug, Clone)]
127pub struct StatusResponse {
128 pub version:String,
129 pub uptime_seconds:u64,
130 pub total_requests:u64,
131 pub successful_requests:u64,
132 pub failed_requests:u64,
133 pub active_requests:u32,
134 pub healthy:bool,
135 pub error:String,
136}
137
138#[derive(Debug, Clone)]
139pub struct MetricsResponse {
140 pub metrics:AirMetricsProtoDTO,
141 pub error:String,
142}
143
144#[derive(Debug, Clone)]
145pub struct AirMetricsProtoDTO {
146 pub memory_usage_mb:f64,
147 pub cpu_usage_percent:f64,
148 pub average_response_time:f64,
149 pub disk_usage_mb:f64,
150 pub network_usage_mbps:f64,
151}
152
153impl AirClientType {
155 pub async fn new(_address:&str) -> Result<Self, String> {
156 Err("AirIntegration feature is not implemented yet".to_string())
157 }
158
159 pub async fn CheckForUpdates(&self, _request:UpdateCheckRequest) -> Result<UpdateCheckResponse, String> {
160 Err("AirIntegration feature is not implemented yet".to_string())
161 }
162
163 pub async fn DownloadFile(&self, _request:DownloadRequest) -> Result<DownloadFileResponse, String> {
164 Err("AirIntegration feature is not implemented yet".to_string())
165 }
166
167 pub async fn ApplyUpdate(&self, _request:ApplyUpdateRequest) -> Result<ApplyUpdateResponse, String> {
168 Err("AirIntegration feature is not implemented yet".to_string())
169 }
170
171 pub async fn AuthenticateUser(&self, _request:AuthenticationRequest) -> Result<AuthenticationResponse, String> {
172 Err("AirIntegration feature is not implemented yet".to_string())
173 }
174
175 pub async fn IndexFiles(&self, _request:IndexRequest) -> Result<IndexFilesResponse, String> {
176 Err("AirIntegration feature is not implemented yet".to_string())
177 }
178
179 pub async fn SearchFiles(&self, _request:SearchRequest) -> Result<SearchFilesResponse, String> {
180 Err("AirIntegration feature is not implemented yet".to_string())
181 }
182
183 pub async fn GetStatus(&self, _request:StatusRequest) -> Result<StatusResponse, String> {
184 Err("AirIntegration feature is not implemented yet".to_string())
185 }
186
187 pub async fn GetMetrics(&self, _request:MetricsRequest) -> Result<MetricsResponse, String> {
188 Err("AirIntegration feature is not implemented yet".to_string())
189 }
190}
191
192pub const DEFAULT_AIR_SERVER_ADDRESS:&str = "127.0.0.1:50051";