remove proxmox-rrd-api-types crate, s/RRDTimeFrameResolution/RRDTimeFrame/

Because the types used inside the RRD have other requirements
than the API types:

- other serialization format
- the API may not support all RRD features

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Dietmar Maurer 2021-10-13 10:24:44 +02:00 committed by Thomas Lamprecht
parent ab567561b5
commit 4bf2db8666
3 changed files with 1 additions and 45 deletions

View File

@ -1,11 +0,0 @@
[package]
name = "proxmox-rrd-api-types"
version = "0.1.0"
authors = ["Proxmox Support Team <support@proxmox.com>"]
edition = "2018"
description = "API type definitions for proxmox-rrd crate."
[dependencies]
serde = { version = "1.0", features = ["derive"] }
proxmox-schema = { version = "1", features = ["api-macro"] }

View File

@ -1,33 +0,0 @@
use serde::{Deserialize, Serialize};
use proxmox_schema::api;
#[api()]
#[derive(Copy, Clone, Serialize, Deserialize)]
#[serde(rename_all = "UPPERCASE")]
/// RRD consolidation mode
pub enum RRDMode {
/// Maximum
Max,
/// Average
Average,
}
#[api()]
#[derive(Copy, Clone, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
/// RRD time frame resolution
pub enum RRDTimeFrameResolution {
/// Hour
Hour,
/// Day
Day,
/// Week
Week,
/// Month
Month,
/// Year
Year,
/// Decade (10 years)
Decade,
}

View File

@ -36,7 +36,7 @@ bitflags!{
pub struct RRAv1 {
/// Defined the data soure type and consolidation function
pub flags: RRAFlags,
/// Resulution (seconds) from [RRDTimeFrameResolution]
/// Resulution (seconds)
pub resolution: u64,
/// Last update time (epoch)
pub last_update: f64,