Skip to content

Commit df7c8b2

Browse files
feat(redis-enterprise): add missing fields to improve API coverage (#272)
* feat(redis-enterprise): add missing fields to improve API coverage - ClusterInfo: added 67 missing fields (alert_settings, block_cluster_changes, etc.) - Proxy: added 23 missing fields for connection management - Module: added 9 missing fields (crdb, dependencies, platforms, etc.) - DatabaseInfo: added 6 missing fields (acl, dns_suffixes, group_uid, etc.) - Shard: added 5 missing fields (all_nodes, assigned_slots, redis_info, etc.) - User: added 4 missing fields (alert fields and password_expiration_duration) - Action: added 2 missing fields (bdb_uid, node_uid) - RedisAcl: added 1 missing field (bdbs) This significantly improves field coverage for Redis Enterprise REST API structs. Fixes #271 * feat(redis-enterprise): add remaining missing fields for complete API coverage - Alert: added error_code field - Endpoint: added description and error_code fields This completes the field coverage improvements, adding all identified missing fields. Part of #271 * docs(redis-enterprise): add comprehensive documentation for all new fields - ClusterInfo: documented all 67 new fields with detailed descriptions - Proxy: documented all 23 new fields explaining connection settings - Module: documented all 9 new fields with clear explanations This provides complete documentation for all fields added to achieve 100% API coverage, making the crate more developer-friendly. Part of #271
1 parent 2c3740d commit df7c8b2

File tree

10 files changed

+373
-0
lines changed

10 files changed

+373
-0
lines changed

crates/redis-enterprise/src/actions.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ pub struct Action {
2222
pub end_time: Option<String>,
2323
pub description: Option<String>,
2424
pub error: Option<String>,
25+
/// Database UID associated with the action
26+
pub bdb_uid: Option<u32>,
27+
/// Node UID associated with the action
28+
pub node_uid: Option<u32>,
2529

2630
#[serde(flatten)]
2731
pub extra: Value,

crates/redis-enterprise/src/alerts.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ pub struct Alert {
3131
pub change_value: Option<Value>,
3232
#[serde(skip_serializing_if = "Option::is_none")]
3333
pub description: Option<String>,
34+
/// Error code associated with the alert
35+
#[serde(skip_serializing_if = "Option::is_none")]
36+
pub error_code: Option<String>,
3437

3538
#[serde(flatten)]
3639
pub extra: Value,

crates/redis-enterprise/src/bdb.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,18 @@ pub struct DatabaseInfo {
193193
pub tls_mode: Option<String>,
194194
pub enforce_client_authentication: Option<String>,
195195
pub default_user: Option<bool>,
196+
/// ACL configuration
197+
pub acl: Option<Value>,
198+
/// Client certificate subject validation type
199+
pub client_cert_subject_validation_type: Option<String>,
200+
/// Compare key hslot
201+
pub compare_key_hslot: Option<bool>,
202+
/// DNS suffixes for endpoints
203+
pub dns_suffixes: Option<Vec<String>>,
204+
/// Group UID for the database
205+
pub group_uid: Option<u32>,
206+
/// Redis cluster mode enabled
207+
pub redis_cluster_enabled: Option<bool>,
196208

197209
// CRDT/Active-Active fields
198210
pub crdt: Option<bool>,

crates/redis-enterprise/src/cluster.rs

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,211 @@ pub struct ClusterInfo {
135135
/// Total number of shards in the cluster
136136
pub total_shards: Option<u32>,
137137

138+
// Additional fields from API audit
139+
/// Alert settings configuration for cluster and nodes
140+
pub alert_settings: Option<Value>,
141+
142+
/// Whether cluster changes are currently blocked (maintenance mode)
143+
pub block_cluster_changes: Option<bool>,
144+
145+
/// Whether CCS (Cluster Configuration Store) internode encryption is enabled
146+
pub ccs_internode_encryption: Option<bool>,
147+
148+
/// Internal port used by the cluster API
149+
pub cluster_api_internal_port: Option<u32>,
150+
151+
/// SSH public key for cluster authentication
152+
pub cluster_ssh_public_key: Option<String>,
153+
154+
/// Port used by Cluster Manager (CM)
155+
pub cm_port: Option<u32>,
156+
157+
/// Version of the Cluster Manager server
158+
pub cm_server_version: Option<u32>,
159+
160+
/// Session timeout for Cluster Manager in minutes
161+
pub cm_session_timeout_minutes: Option<u32>,
162+
163+
/// Maximum threads per worker for CNM HTTP server
164+
pub cnm_http_max_threads_per_worker: Option<u32>,
165+
166+
/// Number of workers for CNM HTTP server
167+
pub cnm_http_workers: Option<u32>,
168+
169+
/// Cipher suites for control plane TLS connections
170+
pub control_cipher_suites: Option<String>,
171+
172+
/// Cipher suites for control plane TLS 1.3 connections
173+
pub control_cipher_suites_tls_1_3: Option<String>,
174+
175+
/// Whether CRDB coordinator should ignore incoming requests
176+
pub crdb_coordinator_ignore_requests: Option<bool>,
177+
178+
/// Port used by CRDB (Conflict-free Replicated Database) coordinator
179+
pub crdb_coordinator_port: Option<u32>,
180+
181+
/// Supported CRDT featureset version number
182+
pub crdt_supported_featureset_version: Option<u32>,
183+
184+
/// List of supported CRDT protocol versions
185+
pub crdt_supported_protocol_versions: Option<Vec<String>>,
186+
187+
/// Timestamp when the cluster was created
188+
pub created_time: Option<String>,
189+
190+
/// Cipher list for data plane connections
191+
pub data_cipher_list: Option<String>,
192+
193+
/// Cipher suites for data plane TLS 1.3 connections
194+
pub data_cipher_suites_tls_1_3: Option<Vec<Value>>,
195+
196+
/// Path to debug information files
197+
pub debuginfo_path: Option<String>,
198+
199+
/// Whether private keys should be encrypted
200+
pub encrypt_pkeys: Option<bool>,
201+
202+
/// Time-to-live for Entra ID (Azure AD) cache in seconds
203+
pub entra_id_cache_ttl: Option<u32>,
204+
205+
/// Admin port for Envoy proxy
206+
pub envoy_admin_port: Option<u32>,
207+
208+
/// Whether Envoy external authorization is enabled
209+
pub envoy_external_authorization: Option<bool>,
210+
211+
/// Maximum number of downstream connections for Envoy
212+
pub envoy_max_downstream_connections: Option<u32>,
213+
214+
/// Port for Envoy management server
215+
pub envoy_mgmt_server_port: Option<u32>,
216+
217+
/// Admin port for gossip Envoy proxy
218+
pub gossip_envoy_admin_port: Option<u32>,
219+
220+
/// Whether to handle metrics endpoint redirects
221+
pub handle_metrics_redirects: Option<bool>,
222+
223+
/// Whether to handle HTTP redirects
224+
pub handle_redirects: Option<bool>,
225+
226+
/// Whether HTTP support is enabled (in addition to HTTPS)
227+
pub http_support: Option<bool>,
228+
229+
/// Configuration for log rotation
230+
pub logrotate_settings: Option<Value>,
231+
232+
/// Whether to mask database credentials in logs
233+
pub mask_bdb_credentials: Option<bool>,
234+
235+
/// Type of metrics system in use
236+
pub metrics_system: Option<u32>,
237+
238+
/// Minimum TLS version for control plane connections
239+
#[serde(rename = "min_control_TLS_version")]
240+
pub min_control_tls_version: Option<String>,
241+
242+
/// Minimum TLS version for data plane connections
243+
#[serde(rename = "min_data_TLS_version")]
244+
pub min_data_tls_version: Option<String>,
245+
246+
/// Minimum TLS version for sentinel connections
247+
#[serde(rename = "min_sentinel_TLS_version")]
248+
pub min_sentinel_tls_version: Option<String>,
249+
250+
/// Maximum size allowed for module uploads in megabytes
251+
pub module_upload_max_size_mb: Option<u32>,
252+
253+
/// List of authorized subject names for mutual TLS authentication
254+
pub mtls_authorized_subjects: Option<Vec<String>>,
255+
256+
/// Certificate authentication mode for mutual TLS
257+
pub mtls_certificate_authentication: Option<String>,
258+
259+
/// Validation type for MTLS client certificate subjects
260+
pub mtls_client_cert_subject_validation_type: Option<String>,
261+
262+
/// Optimization level for multi-command operations
263+
pub multi_commands_opt: Option<String>,
264+
265+
/// Whether HTTP OPTIONS method is forbidden
266+
pub options_method_forbidden: Option<bool>,
267+
268+
/// Requirements for password complexity
269+
pub password_complexity: Option<Value>,
270+
271+
/// Duration in seconds before passwords expire
272+
pub password_expiration_duration: Option<u32>,
273+
274+
/// Algorithm used for hashing passwords
275+
pub password_hashing_algorithm: Option<String>,
276+
277+
/// Minimum required length for passwords
278+
pub password_min_length: Option<u32>,
279+
280+
/// Certificate used by proxy servers
281+
pub proxy_certificate: Option<String>,
282+
283+
/// List of ports reserved for system use
284+
pub reserved_ports: Option<Vec<u32>>,
285+
286+
/// Whether robust CRDT syncer mode is enabled
287+
pub robust_crdt_syncer: Option<bool>,
288+
289+
/// Whether to verify S3 certificates
290+
pub s3_certificate_verification: Option<bool>,
291+
292+
/// Cipher suites for sentinel TLS connections
293+
pub sentinel_cipher_suites: Option<String>,
294+
295+
/// Cipher suites for sentinel TLS 1.3 connections
296+
pub sentinel_cipher_suites_tls_1_3: Option<Vec<Value>>,
297+
298+
/// TLS mode for sentinel connections
299+
pub sentinel_tls_mode: Option<String>,
300+
301+
/// Whether slave high availability is enabled
302+
pub slave_ha: Option<bool>,
303+
304+
/// Cooldown period for database slave HA in seconds
305+
pub slave_ha_bdb_cooldown_period: Option<u32>,
306+
307+
/// General cooldown period for slave HA in seconds
308+
pub slave_ha_cooldown_period: Option<u32>,
309+
310+
/// Grace period for slave HA operations in seconds
311+
pub slave_ha_grace_period: Option<u32>,
312+
313+
/// Whether slowlog sanitization is supported
314+
pub slowlog_in_sanitized_support: Option<bool>,
315+
316+
/// TLS mode for SMTP connections
317+
pub smtp_tls_mode: Option<String>,
318+
319+
/// Whether to use TLS for SMTP connections
320+
pub smtp_use_tls: Option<bool>,
321+
322+
/// Certificate used by syncer processes
323+
pub syncer_certificate: Option<String>,
324+
325+
/// Ports reserved for system processes
326+
pub system_reserved_ports: Option<Vec<u32>>,
327+
328+
/// Whether a cluster upgrade is currently in progress
329+
pub upgrade_in_progress: Option<bool>,
330+
331+
/// Current upgrade mode for the cluster
332+
pub upgrade_mode: Option<String>,
333+
334+
/// Use external IPv6
335+
pub use_external_ipv6: Option<bool>,
336+
337+
/// Use IPv6
338+
pub use_ipv6: Option<bool>,
339+
340+
/// Wait command support
341+
pub wait_command: Option<bool>,
342+
138343
#[serde(flatten)]
139344
pub extra: Value,
140345
}

crates/redis-enterprise/src/endpoints.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ pub struct Endpoint {
2626
pub ssl: Option<bool>,
2727
#[serde(skip_serializing_if = "Option::is_none")]
2828
pub status: Option<String>,
29+
/// Description of the endpoint
30+
#[serde(skip_serializing_if = "Option::is_none")]
31+
pub description: Option<String>,
32+
/// Error code if endpoint has an error
33+
#[serde(skip_serializing_if = "Option::is_none")]
34+
pub error_code: Option<String>,
2935

3036
#[serde(flatten)]
3137
pub extra: Value,

crates/redis-enterprise/src/modules.rs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,35 @@ pub struct Module {
2727
pub compatible_redis_version: Option<String>,
2828
pub display_name: Option<String>,
2929
pub is_bundled: Option<bool>,
30+
31+
// Additional fields from API audit
32+
/// Whether the module supports BigStore (Auto Tiering) version 2
33+
pub bigstore_version_2_support: Option<bool>,
34+
35+
/// Name of the capability this module provides
36+
pub capability_name: Option<String>,
37+
38+
/// Redis command used to configure this module
39+
pub config_command: Option<String>,
40+
41+
/// Whether the module supports CRDB (Conflict-free Replicated Database)
42+
pub crdb: Option<bool>,
43+
44+
/// List of other modules this module depends on
45+
pub dependencies: Option<Vec<Value>>,
46+
47+
/// Contact email address of the module author
48+
pub email: Option<String>,
49+
50+
/// Minimum Redis Enterprise version required for this module
51+
pub min_redis_pack_version: Option<String>,
52+
53+
/// List of platforms this module supports (e.g., 'linux-x64', 'linux-arm64')
54+
pub platforms: Option<Vec<String>>,
55+
56+
/// SHA256 checksum of the module binary for verification
57+
pub sha256: Option<String>,
58+
3059
#[serde(flatten)]
3160
pub extra: Value,
3261
}

0 commit comments

Comments
 (0)