mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-08 06:13:14 +00:00
10c63effd4
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
72 lines
1.5 KiB
Rust
72 lines
1.5 KiB
Rust
mod name;
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
use name::Name;
|
|
|
|
// 定义common结构体
|
|
#[derive(Debug, Deserialize, Serialize, Default,Clone)]
|
|
struct Common {
|
|
pub id: String,
|
|
pub filter: S3Key,
|
|
pub events: Vec<Name>,
|
|
}
|
|
|
|
// 定义Queue结构体
|
|
#[derive(Debug, Deserialize, Serialize, Default,Clone)]
|
|
struct Queue {
|
|
pub common: Common,
|
|
pub arn: ARN,
|
|
}
|
|
|
|
// 定义ARN结构体
|
|
#[derive(Debug, Deserialize, Serialize, Default,Clone)]
|
|
pub struct ARN {
|
|
pub target_id: TargetID,
|
|
pub region: String,
|
|
}
|
|
|
|
// 定义TargetID结构体
|
|
#[derive(Debug, Deserialize, Serialize, Default,Clone)]
|
|
pub struct TargetID {
|
|
pub id: String,
|
|
pub name: String,
|
|
}
|
|
|
|
// 定义FilterRule结构体
|
|
#[derive(Debug, Deserialize, Serialize, Default,Clone)]
|
|
pub struct FilterRule {
|
|
pub name: String,
|
|
pub value: String,
|
|
}
|
|
|
|
// 定义FilterRuleList结构体
|
|
#[derive(Debug, Deserialize, Serialize, Default,Clone)]
|
|
pub struct FilterRuleList {
|
|
pub rules: Vec<FilterRule>,
|
|
}
|
|
|
|
// 定义S3Key结构体
|
|
#[derive(Debug, Deserialize, Serialize, Default,Clone)]
|
|
pub struct S3Key {
|
|
pub rule_list: FilterRuleList,
|
|
}
|
|
|
|
#[derive(Debug, Deserialize, Serialize, Default,Clone)]
|
|
pub struct Lambda {
|
|
arn: String,
|
|
}
|
|
|
|
// 定义Topic结构体
|
|
#[derive(Debug, Deserialize, Serialize, Default,Clone)]
|
|
pub struct Topic {
|
|
arn: String,
|
|
}
|
|
|
|
#[derive(Debug, Deserialize, Serialize, Default,Clone)]
|
|
pub struct Config {
|
|
queue_list: Vec<Queue>,
|
|
lambda_list: Vec<Lambda>,
|
|
topic_list: Vec<Topic>,
|
|
}
|