]>
Commit | Line | Data |
---|---|---|
9f95a23c TL |
1 | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- |
2 | // vim: ts=8 sw=2 smarttab ft=cpp | |
3 | ||
1e59de90 | 4 | #pragma once |
11fdf7f2 TL |
5 | |
6 | #include "rgw_cr_rados.h" | |
7 | #include "rgw_tools.h" | |
8 | #include "rgw_lc.h" | |
9 | ||
9f95a23c | 10 | #include "services/svc_bucket_sync.h" |
11fdf7f2 TL |
11 | |
12 | struct rgw_user_create_params { | |
13 | rgw_user user; | |
14 | std::string display_name; | |
15 | std::string email; | |
16 | std::string access_key; | |
17 | std::string secret_key; | |
18 | std::string key_type; /* "swift" or "s3" */ | |
19 | std::string caps; | |
20 | ||
21 | bool generate_key{true}; | |
22 | bool suspended{false}; | |
23 | std::optional<int32_t> max_buckets; | |
24 | bool system{false}; | |
25 | bool exclusive{false}; | |
26 | bool apply_quota{true}; | |
27 | }; | |
28 | ||
29 | using RGWUserCreateCR = RGWSimpleWriteOnlyAsyncCR<rgw_user_create_params>; | |
30 | ||
31 | struct rgw_get_user_info_params { | |
32 | rgw_user user; | |
33 | }; | |
34 | ||
35 | using RGWGetUserInfoCR = RGWSimpleAsyncCR<rgw_get_user_info_params, RGWUserInfo>; | |
36 | ||
37 | struct rgw_get_bucket_info_params { | |
20effc67 TL |
38 | std::string tenant; |
39 | std::string bucket_name; | |
11fdf7f2 TL |
40 | }; |
41 | ||
42 | struct rgw_get_bucket_info_result { | |
20effc67 | 43 | std::unique_ptr<rgw::sal::Bucket> bucket; |
11fdf7f2 TL |
44 | }; |
45 | ||
46 | using RGWGetBucketInfoCR = RGWSimpleAsyncCR<rgw_get_bucket_info_params, rgw_get_bucket_info_result>; | |
47 | ||
48 | struct rgw_bucket_create_local_params { | |
20effc67 | 49 | std::shared_ptr<RGWUserInfo> user_info; |
11fdf7f2 TL |
50 | std::string bucket_name; |
51 | rgw_placement_rule placement_rule; | |
52 | }; | |
53 | ||
54 | using RGWBucketCreateLocalCR = RGWSimpleWriteOnlyAsyncCR<rgw_bucket_create_local_params>; | |
55 | ||
56 | struct rgw_object_simple_put_params { | |
57 | RGWDataAccess::BucketRef bucket; | |
58 | rgw_obj_key key; | |
59 | bufferlist data; | |
20effc67 TL |
60 | std::map<std::string, bufferlist> attrs; |
61 | std::optional<std::string> user_data; | |
11fdf7f2 TL |
62 | }; |
63 | ||
64 | using RGWObjectSimplePutCR = RGWSimpleWriteOnlyAsyncCR<rgw_object_simple_put_params>; | |
65 | ||
66 | ||
67 | struct rgw_bucket_lifecycle_config_params { | |
20effc67 TL |
68 | rgw::sal::Bucket* bucket; |
69 | rgw::sal::Attrs bucket_attrs; | |
11fdf7f2 TL |
70 | RGWLifecycleConfiguration config; |
71 | }; | |
72 | ||
73 | using RGWBucketLifecycleConfigCR = RGWSimpleWriteOnlyAsyncCR<rgw_bucket_lifecycle_config_params>; | |
74 | ||
9f95a23c TL |
75 | struct rgw_bucket_get_sync_policy_params { |
76 | std::optional<rgw_zone_id> zone; | |
77 | std::optional<rgw_bucket> bucket; | |
78 | }; | |
79 | ||
80 | struct rgw_bucket_get_sync_policy_result { | |
81 | RGWBucketSyncPolicyHandlerRef policy_handler; | |
82 | }; | |
83 | ||
84 | using RGWBucketGetSyncPolicyHandlerCR = RGWSimpleAsyncCR<rgw_bucket_get_sync_policy_params, rgw_bucket_get_sync_policy_result>; | |
11fdf7f2 | 85 |