mirror of
https://git.proxmox.com/git/proxmox
synced 2025-08-09 05:24:38 +00:00
use new apt/apt-api-types crate
This commit is contained in:
parent
e226ddcc90
commit
4a69e1cf64
@ -16,6 +16,7 @@ serde.workspace = true
|
|||||||
serde_plain.workspace = true
|
serde_plain.workspace = true
|
||||||
|
|
||||||
proxmox-auth-api = { workspace = true, features = [ "api-types" ] }
|
proxmox-auth-api = { workspace = true, features = [ "api-types" ] }
|
||||||
|
proxmox-apt-api-types.workspace = true
|
||||||
proxmox-human-byte.workspace = true
|
proxmox-human-byte.workspace = true
|
||||||
proxmox-lang.workspace=true
|
proxmox-lang.workspace=true
|
||||||
proxmox-schema = { workspace = true, features = [ "api-macro" ] }
|
proxmox-schema = { workspace = true, features = [ "api-macro" ] }
|
||||||
|
@ -52,6 +52,13 @@ pub use proxmox_schema::api_types::{SYSTEMD_DATETIME_FORMAT, TIME_ZONE_SCHEMA};
|
|||||||
|
|
||||||
use proxmox_schema::api_types::{DNS_NAME_STR, IPRE_BRACKET_STR};
|
use proxmox_schema::api_types::{DNS_NAME_STR, IPRE_BRACKET_STR};
|
||||||
|
|
||||||
|
// re-export APT API types
|
||||||
|
pub use proxmox_apt_api_types::{
|
||||||
|
APTChangeRepositoryOptions, APTGetChangelogOptions, APTRepositoriesResult, APTRepositoryFile,
|
||||||
|
APTRepositoryFileError, APTRepositoryHandle, APTRepositoryInfo, APTStandardRepository,
|
||||||
|
APTUpdateInfo, APTUpdateOptions,
|
||||||
|
};
|
||||||
|
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
pub const BACKUP_ID_RE: &str = r"[A-Za-z0-9_][A-Za-z0-9._\-]*";
|
pub const BACKUP_ID_RE: &str = r"[A-Za-z0-9_][A-Za-z0-9._\-]*";
|
||||||
|
|
||||||
@ -249,34 +256,6 @@ pub const PASSWORD_HINT_SCHEMA: Schema = StringSchema::new("Password hint.")
|
|||||||
.max_length(64)
|
.max_length(64)
|
||||||
.schema();
|
.schema();
|
||||||
|
|
||||||
#[api()]
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
#[serde(rename_all = "PascalCase")]
|
|
||||||
/// Describes a package for which an update is available.
|
|
||||||
pub struct APTUpdateInfo {
|
|
||||||
/// Package name
|
|
||||||
pub package: String,
|
|
||||||
/// Package title
|
|
||||||
pub title: String,
|
|
||||||
/// Package architecture
|
|
||||||
pub arch: String,
|
|
||||||
/// Human readable package description
|
|
||||||
pub description: String,
|
|
||||||
/// New version to be updated to
|
|
||||||
pub version: String,
|
|
||||||
/// Old version currently installed
|
|
||||||
pub old_version: String,
|
|
||||||
/// Package origin
|
|
||||||
pub origin: String,
|
|
||||||
/// Package priority in human-readable form
|
|
||||||
pub priority: String,
|
|
||||||
/// Package section
|
|
||||||
pub section: String,
|
|
||||||
/// Custom extra field for additional package information
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
pub extra_info: Option<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[api()]
|
#[api()]
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||||
#[serde(rename_all = "lowercase")]
|
#[serde(rename_all = "lowercase")]
|
||||||
|
Loading…
Reference in New Issue
Block a user