refactor: clean remaining storage DTO imports (#3568)

This commit is contained in:
安正超
2026-06-18 14:44:46 +08:00
committed by GitHub
parent acdf439371
commit 0e7e2660bb
24 changed files with 249 additions and 119 deletions
+1
View File
@@ -51,6 +51,7 @@ pub mod ratelimit;
pub mod router;
pub mod slo;
pub mod staticweb;
pub mod storage_compat;
pub mod symlink;
pub mod sync;
pub mod tempurl;
+2 -9
View File
@@ -55,25 +55,18 @@ use super::{SwiftError, SwiftResult};
use axum::http::HeaderMap;
use rustfs_credentials::Credentials;
use rustfs_ecstore::resolve_object_store_handle;
use rustfs_ecstore::store_api::{
GetObjectReader as EcstoreGetObjectReader, ObjectInfo as EcstoreObjectInfo, ObjectOptions as EcstoreObjectOptions,
PutObjReader as EcstorePutObjReader,
};
use rustfs_rio::HashReader;
use rustfs_storage_api::{BucketOperations, BucketOptions, ObjectIO as _, ObjectOperations as _};
use std::collections::HashMap;
use tracing::debug;
use tracing::error;
pub use super::storage_compat::{SwiftGetObjectReader, SwiftObjectInfo, SwiftObjectOptions, SwiftPutObjReader};
const LOG_COMPONENT_PROTOCOLS: &str = "protocols";
const LOG_SUBSYSTEM_SWIFT_OBJECT: &str = "swift_object";
const EVENT_SWIFT_OBJECT_STORAGE_STATE: &str = "swift_object_storage_state";
pub type SwiftGetObjectReader = EcstoreGetObjectReader;
pub type SwiftObjectInfo = EcstoreObjectInfo;
pub type SwiftObjectOptions = EcstoreObjectOptions;
pub type SwiftPutObjReader = EcstorePutObjReader;
/// Maximum number of metadata headers allowed per object (Swift standard)
const MAX_METADATA_COUNT: usize = 90;
@@ -0,0 +1,23 @@
// Copyright 2024 RustFS Team
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use rustfs_ecstore::store_api::{
GetObjectReader as EcstoreGetObjectReader, ObjectInfo as EcstoreObjectInfo, ObjectOptions as EcstoreObjectOptions,
PutObjReader as EcstorePutObjReader,
};
pub type SwiftGetObjectReader = EcstoreGetObjectReader;
pub type SwiftObjectInfo = EcstoreObjectInfo;
pub type SwiftObjectOptions = EcstoreObjectOptions;
pub type SwiftPutObjReader = EcstorePutObjReader;