]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/rgw_basic_types.cc
5 #include "rgw_basic_types.h"
6 #include "common/ceph_json.h"
9 using std::stringstream
;
11 void decode_json_obj(rgw_user
& val
, JSONObj
*obj
)
13 string s
= obj
->get_data();
17 void encode_json(const char *name
, const rgw_user
& val
, Formatter
*f
)
19 string s
= val
.to_str();
20 f
->dump_string(name
, s
);
25 ostream
& operator <<(ostream
& m
, const Principal
& p
) {
26 if (p
.is_wildcard()) {
30 m
<< "arn:aws:iam:" << p
.get_tenant() << ":";
34 return m
<< (p
.is_user() ? "user/" : "role/") << p
.get_id();
36 string
to_string(const Principal
& p
) {