mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-05 21:07:43 +00:00
feat: translate Chinese comments to English across codebase
This commit is contained in:
@@ -50,7 +50,7 @@ impl Operation for AssumeRoleHandle {
|
||||
let (cred, _owner) =
|
||||
check_key_valid(get_session_token(&req.uri, &req.headers).unwrap_or_default(), &user.access_key).await?;
|
||||
|
||||
// // TODO: 判断权限, 不允许sts访问
|
||||
// // TODO: Check permissions, do not allow STS access
|
||||
if cred.is_temp() || cred.is_service_account() {
|
||||
return Err(s3_error!(InvalidRequest, "AccessDenied"));
|
||||
}
|
||||
|
||||
+1
-1
@@ -138,7 +138,7 @@ async fn run(opt: config::Opt) -> Result<()> {
|
||||
// let local_ip = utils::get_local_ip().ok_or(local_addr.ip()).unwrap();
|
||||
let local_ip = rustfs_utils::get_local_ip().ok_or(local_addr.ip()).unwrap();
|
||||
|
||||
// 用于 rpc
|
||||
// For RPC
|
||||
let (endpoint_pools, setup_type) = EndpointServerPools::from_volumes(server_address.clone().as_str(), opt.volumes.clone())
|
||||
.map_err(|err| Error::from_string(err.to_string()))?;
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ impl S3Access for FS {
|
||||
// /// + [`cx.s3_op().name()`](crate::S3Operation::name)
|
||||
// /// + [`cx.extensions_mut()`](S3AccessContext::extensions_mut)
|
||||
async fn check(&self, cx: &mut S3AccessContext<'_>) -> S3Result<()> {
|
||||
// 上层验证了 ak/sk
|
||||
// Upper layer has verified ak/sk
|
||||
// info!(
|
||||
// "s3 check uri: {:?}, method: {:?} path: {:?}, s3_op: {:?}, cred: {:?}, headers:{:?}",
|
||||
// cx.uri(),
|
||||
@@ -173,7 +173,7 @@ impl S3Access for FS {
|
||||
let ext = cx.extensions_mut();
|
||||
ext.insert(req_info);
|
||||
|
||||
// 统一在这验证?还是在下面各自验证?
|
||||
// Verify uniformly here? Or verify separately below?
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ impl FS {
|
||||
|
||||
let ext = ext.to_owned();
|
||||
|
||||
// TODO: spport zip
|
||||
// TODO: support zip
|
||||
let decoder = CompressionFormat::from_extension(&ext).get_decoder(body).map_err(|e| {
|
||||
error!("get_decoder err {:?}", e);
|
||||
s3_error!(InvalidArgument, "get_decoder err")
|
||||
@@ -204,8 +204,8 @@ impl FS {
|
||||
// )
|
||||
// .await
|
||||
// {
|
||||
// Ok(_) => println!("解压成功!"),
|
||||
// Err(e) => println!("解压失败: {}", e),
|
||||
// Ok(_) => println!("Decompression successful!"),
|
||||
// Err(e) => println!("Decompression failed: {}", e),
|
||||
// }
|
||||
|
||||
// TODO: etag
|
||||
@@ -341,7 +341,7 @@ impl S3 for FS {
|
||||
#[tracing::instrument(level = "debug", skip(self, req))]
|
||||
async fn delete_bucket(&self, req: S3Request<DeleteBucketInput>) -> S3Result<S3Response<DeleteBucketOutput>> {
|
||||
let input = req.input;
|
||||
// TODO: DeleteBucketInput 没有 force 参数?
|
||||
// TODO: DeleteBucketInput doesn't have force parameter?
|
||||
let Some(store) = new_object_layer_fn() else {
|
||||
return Err(S3Error::with_message(S3ErrorCode::InternalError, "Not init".to_string()));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user