abedra / libvault

A C++ library for Hashicorp Vault
MIT License
34 stars 26 forks source link

Zsp make passing arrays possible #88

Closed zspasztori closed 3 years ago

zspasztori commented 3 years ago

This should make it possible to set as a parameter arrays and maps.

For example in create_token we can add policies as a list, or in PKI::setUrls the parameters can be lists instead of a single value.

This is a minimally invasive solution in my opinion. Does not break backward compatibility.

This would allow the KV secret engine function to not have to use the special callbacks.

Unfortunately, it is still not possible to pass directly a bool because of this bug : https://stackoverflow.com/questions/60681710/prefer-stdstring-in-stdvariantbool-stdstring-for-const-char But anyway this would only be syntactic sugar.

abedra commented 3 years ago

Thanks, this is totally reasonable. There are a couple cases I want to check before merging, but i'll take a look at those today.