couchdb_orm/client/couchdb/responses/db_status.rs
1// Copyright (C) 2020-2023 OpenToolAdd
2//
3// This program is free software: you can redistribute it and/or modify
4// it under the terms of the GNU General Public License as published by
5// the Free Software Foundation, either version 3 of the License, or
6// (at your option) any later version.
7//
8// This program is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11// GNU General Public License for more details.
12//
13// You should have received a copy of the GNU General Public License
14// along with this program. If not, see <http://www.gnu.org/licenses/>.
15// contact: contact@tool-add.com
16
17use serde::{Deserialize, Serialize};
18use std::collections::HashMap;
19
20#[derive(Debug, Clone, Serialize, Deserialize)]
21pub struct Size {
22 pub file: usize,
23 pub external: usize,
24 pub active: usize,
25}
26
27#[derive(Debug, Clone, Serialize, Deserialize)]
28pub struct DbStatus {
29 pub db_name: String,
30 pub purge_seq: String,
31 pub update_seq: String,
32 pub sizes: Size,
33 pub props: serde_json::Value,
34 pub doc_del_count: usize,
35 pub doc_count: usize,
36 pub disk_format_version: usize,
37 pub compact_running: bool,
38 pub cluster: HashMap<String, usize>,
39 pub instance_start_time: String,
40}