Package Usage: go: github.com/hashicorp/protostructure
Package protostructure provides a mechanism for encoding and decoding
a struct _type_ using protocol buffers. To be clear: this encodes the
_type_ and not the _value_.
Most importantly, this lets you do things such as transferring a struct
that supports JSON decoding across a protobuf RPC, and then decoding
a JSON value directly into it since you have access to things such as
struct tags from the remote end.
For a pure JSON use case, it may make sense to instead send the JSON
rather than send the struct type. There are other scenarios where sending
the type is easier and this library facilitates those use cases.
The primary functions you want to look at are "Encode" and "New".
1 version
Latest release: over 3 years ago
7 dependent packages
View more package details: https://packages.ecosystem.code.gouv.fr/registries/proxy.golang.org/packages/github.com/hashicorp/protostructure