mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-29 08:27:06 +00:00
Fix: #38
Squashed commit of the following: commit ff72105e1ec81b5679401b021fb44e8135444de8 Author: weisd <weishidavip@163.com> Date: Sat Oct 5 09:55:09 2024 +0800 base bucketmetadata_sys done commit 69d0c7725ae1065d25755c71aa54e42c4f3cdb50 Author: weisd <weishidavip@163.com> Date: Sat Oct 5 01:41:19 2024 +0800 update bucket tagging op use bucketmetadata_sys commit 39902c73d6f7a817041245af84a23d14115c70dc Author: weisd <weishidavip@163.com> Date: Fri Oct 4 23:32:07 2024 +0800 test bucketmetadata_sys commit 15f1dfc765dc383ab26d71aca7c64dd0917b83f3 Author: weisd <weishidavip@163.com> Date: Fri Oct 4 23:21:58 2024 +0800 init bucketmetadata_sys commit 8c3c5e0f7385fa881b1dc4811d92afe8b86e9a6f Author: weisd <weishidavip@163.com> Date: Tue Oct 1 23:06:09 2024 +0800 init bucketmetadata_sys commit e2746d154aa68be9dcf8add0241b38c72ef89b9c Author: weisd <weishidavip@163.com> Date: Tue Oct 1 04:35:25 2024 +0800 stash
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::collections::HashSet;
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Default)]
|
||||
#[derive(Debug, Deserialize, Serialize, Default,Clone)]
|
||||
pub struct ActionSet(HashSet<Action>);
|
||||
|
||||
impl ActionSet {}
|
||||
|
||||
@@ -9,7 +9,7 @@ use super::{
|
||||
resource::ResourceSet,
|
||||
};
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Default)]
|
||||
#[derive(Debug, Deserialize, Serialize, Default, Clone)]
|
||||
pub struct BucketPolicyArgs {
|
||||
account_name: String,
|
||||
groups: Vec<String>,
|
||||
@@ -20,7 +20,7 @@ pub struct BucketPolicyArgs {
|
||||
object_name: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Default)]
|
||||
#[derive(Debug, Deserialize, Serialize, Default, Clone)]
|
||||
pub struct BPStatement {
|
||||
sid: String,
|
||||
effect: Effect,
|
||||
@@ -32,7 +32,7 @@ pub struct BPStatement {
|
||||
conditions: Option<Functions>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Default)]
|
||||
#[derive(Debug, Deserialize, Serialize, Default, Clone)]
|
||||
pub struct BucketPolicy {
|
||||
pub id: String,
|
||||
pub version: String,
|
||||
|
||||
@@ -41,14 +41,14 @@ pub trait FunctionApi {
|
||||
// }
|
||||
// }
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Default)]
|
||||
#[derive(Debug, Deserialize, Serialize, Default, Clone)]
|
||||
enum Function {
|
||||
#[default]
|
||||
Test,
|
||||
}
|
||||
|
||||
// 定义Functions类型
|
||||
#[derive(Deserialize, Serialize, Default)]
|
||||
#[derive(Deserialize, Serialize, Default, Clone)]
|
||||
pub struct Functions(Vec<Function>);
|
||||
|
||||
impl Debug for Functions {
|
||||
|
||||
@@ -15,11 +15,11 @@ const RESOURCE_ARN_PREFIX: &str = "arn:aws:s3:::";
|
||||
const RESOURCE_ARN_KMS_PREFIX: &str = "arn:rustfs:kms::::";
|
||||
|
||||
// 定义Resource结构体
|
||||
#[derive(Debug, Deserialize, Serialize, Default, PartialEq, Eq, Hash)]
|
||||
#[derive(Debug, Deserialize, Serialize, Default, PartialEq, Eq, Hash, Clone)]
|
||||
pub struct Resource {
|
||||
pattern: String,
|
||||
r#type: ResourceARNType,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Default)]
|
||||
#[derive(Debug, Deserialize, Serialize, Default, Clone)]
|
||||
pub struct ResourceSet(HashSet<Resource>);
|
||||
|
||||
Reference in New Issue
Block a user