Vault GoLang Library tutorials/examples

Hello,
Is there any tutorials/examples/guides for Vault Client API in GoLang? I am new to language so looking for some templates/patterns that I can experiment with :slight_smile:

Thank you

3 Likes

Hi!

We do have a Vault client in the code. You could use its code as an example for rolling your own, or you could use it directly, whatever you’d prefer. You should be able to see how it’s used by searching for it in the Vault repo.

-Becca

1 Like

Hello Becca,
Thank you for reply, what I was looking is more like HVAC in python for Vault.

https://hvac.readthedocs.io/en/stable/

Hi!

Ah! That makes sense. I double-checked our Vault clients reference, and we don’t currently have anything more like what you’re thinking of. It sounds like you’re looking for something with strongly typed functions with names that match each API method or endpoint. Ours isn’t there yet.

We would love to have that. We added the ability to generate an OpenAPI doc to Vault recently which makes it so all the endpoints can be described, along with all their fields, fields types, and such, all in JSON. Someday we’d like to use that to generate a more strongly-typed client in Go, and other languages.

In the meantime, our API is very well-documented here and may be of help.

2 Likes

Any update on when will examples with the Vault Go Client be made available. The best I could find was https://play.golang.org/p/ZH911dtVokY
Looking for something official and some sort of best practice examples.