From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id BE6BC6B7DD for ; Tue, 21 Sep 2021 07:58:59 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id BCE7C8E55 for ; Tue, 21 Sep 2021 07:58:59 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 4A5FF8E1A for ; Tue, 21 Sep 2021 07:58:58 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 23E8B449DF; Tue, 21 Sep 2021 07:58:58 +0200 (CEST) From: Dietmar Maurer To: pbs-devel@lists.proxmox.com Date: Tue, 21 Sep 2021 07:58:44 +0200 Message-Id: <20210921055854.3799470-7-dietmar@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210921055854.3799470-1-dietmar@proxmox.com> References: <20210921055854.3799470-1-dietmar@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.613 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [mod.rs, rest.rs, compression.rs, lib.rs] Subject: [pbs-devel] [PATCH proxmox-backup v2 06/16] move src/tools/compression.rs to proxmox-rest-server crate X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2021 05:58:59 -0000 --- {src/tools => proxmox-rest-server/src}/compression.rs | 0 proxmox-rest-server/src/lib.rs | 3 +++ src/server/rest.rs | 8 +++++--- src/tools/mod.rs | 1 - 4 files changed, 8 insertions(+), 4 deletions(-) rename {src/tools => proxmox-rest-server/src}/compression.rs (100%) diff --git a/src/tools/compression.rs b/proxmox-rest-server/src/compression.rs similarity index 100% rename from src/tools/compression.rs rename to proxmox-rest-server/src/compression.rs diff --git a/proxmox-rest-server/src/lib.rs b/proxmox-rest-server/src/lib.rs index bc8334ba..069d80b4 100644 --- a/proxmox-rest-server/src/lib.rs +++ b/proxmox-rest-server/src/lib.rs @@ -4,6 +4,9 @@ use anyhow::{bail, format_err, Error}; use proxmox::tools::fd::Fd; +mod compression; +pub use compression::*; + pub mod daemon; pub mod formatter; diff --git a/src/server/rest.rs b/src/server/rest.rs index 8beecb55..7e2e645c 100644 --- a/src/server/rest.rs +++ b/src/server/rest.rs @@ -34,13 +34,15 @@ use proxmox::tools::fs::CreateOptions; use pbs_tools::compression::{DeflateEncoder, Level}; use pbs_tools::stream::AsyncReaderStream; use pbs_api_types::{Authid, Userid}; -use proxmox_rest_server::{ApiConfig, FileLogger, FileLogOptions, AuthError, RestEnvironment}; +use proxmox_rest_server::{ + ApiConfig, FileLogger, FileLogOptions, AuthError, RestEnvironment, CompressionMethod, +}; use proxmox_rest_server::formatter::*; -use crate::auth_helpers::*; use pbs_config::CachedUserInfo; + +use crate::auth_helpers::*; use crate::tools; -use crate::tools::compression::CompressionMethod; extern "C" { fn tzset(); diff --git a/src/tools/mod.rs b/src/tools/mod.rs index 8fd441b5..f2576b08 100644 --- a/src/tools/mod.rs +++ b/src/tools/mod.rs @@ -14,7 +14,6 @@ use proxmox_http::{ pub mod apt; pub mod async_io; -pub mod compression; pub mod config; pub mod disks; -- 2.30.2