gibbz00 / rops

A SOPS alternative in pure rust.
https://gibbz00.github.io/rops/
Mozilla Public License 2.0
20 stars 2 forks source link

`dotenv` file format support #99

Open darlaam opened 1 month ago

darlaam commented 1 month ago

Great job for rops. I've an use-case where I'd to use a dotenv file format, but it's not (yet) implemented in rops. Do you have any plan for it ?

gibbz00 commented 1 month ago

I don't have an immediate plan for it, but I would not hold anyone against creating a PR 😊

One thing I do want to explore though, is direct implementation of Serialize/Deserialize on the RopsTree<DecryptedMap>/RopsTree<EncryptedMap<C>> rather than writing format specific implementations on FileFormatValueAdapter/FileFormatKeyAdapter. This could possibly make the addition of new file formats pretty trivial.

Should note that I don't think the popular envy supports nested structs, and serde-env does not seem to support a EnvValue similar to serde_json::Value. So Serialize/Deserialize implementations on the respective structs be required after all.

A serde_value approach may also be worth looking into.