6 #ifndef __SHOW_SECURITY_H__ 7 #define __SHOW_SECURITY_H__ 26 names(std::vector<std::string>()),
27 options(std::map<std::string, std::string>())
60 ShowSecurityRequest(
const std::vector<std::string>& names_,
const std::map<std::string, std::string>& options_):
91 std::map<std::string, std::string>
options;
97 template<>
struct codec_traits<
gpudb::ShowSecurityRequest>
101 ::avro::encode(e, v.
names);
107 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
109 const std::vector<size_t> fo = rd->fieldOrder();
111 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
116 ::avro::decode(d, v.
names);
130 ::avro::decode(d, v.
names);
150 types(std::map<std::string, std::string>()),
151 roles(std::map<std::string, std::vector<std::string> >()),
152 permissions(std::map<std::string, std::vector<std::map<std::string, std::string> > >()),
154 info(std::map<std::string, std::string>())
171 std::map<std::string, std::string>
types;
177 std::map<std::string, std::vector<std::string> >
roles;
183 std::map<std::string, std::vector<std::map<std::string, std::string> > >
permissions;
193 std::map<std::string, std::string>
info;
199 template<>
struct codec_traits<
gpudb::ShowSecurityResponse>
203 ::avro::encode(e, v.
types);
204 ::avro::encode(e, v.
roles);
207 ::avro::encode(e, v.
info);
212 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
214 const std::vector<size_t> fo = rd->fieldOrder();
216 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
221 ::avro::decode(d, v.
types);
225 ::avro::decode(d, v.
roles);
237 ::avro::decode(d, v.
info);
247 ::avro::decode(d, v.
types);
248 ::avro::decode(d, v.
roles);
251 ::avro::decode(d, v.
info);
257 #endif // __SHOW_SECURITY_H__
std::map< std::string, std::vector< std::map< std::string, std::string > > > permissions
Map of user/role name to a list of permissions directly granted to that user/role.
std::map< std::string, std::string > options
Optional parameters.
A set of results returned by GPUdb::showSecurity.
std::map< std::string, std::vector< std::string > > roles
Map of user/role name to a list of names of roles of which that user/role is a member.
std::map< std::string, std::string > resourceGroups
Map of user name to resource group name.
ShowSecurityResponse()
Constructs a ShowSecurityResponse object with default parameters.
std::map< std::string, std::string > types
Map of user/role name to the type of that user/role.
std::map< std::string, std::string > info
Additional information.
A set of parameters for GPUdb::showSecurity.
ShowSecurityRequest()
Constructs a ShowSecurityRequest object with default parameters.
ShowSecurityRequest(const std::vector< std::string > &names_, const std::map< std::string, std::string > &options_)
Constructs a ShowSecurityRequest object with the specified parameters.
std::vector< std::string > names
A list of names of users and/or roles about which security information is requested.