feat(redis): download large Redis values

This commit is contained in:
二丫讲梵 authored and GitHub committed 2026-09-30 18:57:37 +08:00
1 parent 0292d4c984
commit 43b6e218b0
19 files changed
+166 -4

No files matched your search

+1
View File
@@ -830,6 +830,7 @@ async fn serve() {
.route("/redis/scan-keys-batch", post(routes::redis::scan_keys_batch))
.route("/redis/scan-values", post(routes::redis::scan_values))
.route("/redis/get-value", post(routes::redis::get_value))
.route("/redis/get-raw-value", post(routes::redis::get_raw_value))
.route("/redis/get-ttl", post(routes::redis::get_ttl))
.route("/redis/get-stream-entries", post(routes::redis::get_stream_entries))
.route("/redis/get-stream-groups", post(routes::redis::get_stream_groups))
+11
View File
@@ -411,6 +411,17 @@ pub async fn get_value(
Ok(Json(serde_json::to_value(result).map_err(|e| AppError::from(e.to_string()))?))
}
pub async fn get_raw_value(
State(state): State<Arc<WebState>>,
Json(req): Json<RedisKeyRequest>,
) -> Result<Json<serde_json::Value>, AppError> {
let result =
dbx_core::redis_ops::redis_get_raw_value_in_db_core(&state.app, &req.connection_id, req.db, &req.key_raw)
.await
.map_err(AppError::from)?;
Ok(Json(serde_json::to_value(result).map_err(|e| AppError::from(e.to_string()))?))
}
pub async fn get_ttl(
State(state): State<Arc<WebState>>,
Json(req): Json<RedisKeyRequest>,