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".
proxy.golang.org
v0.0.0-20220321171222-f93c3097f865
almost 4 years ago
1
7
13
Links
| Registry | proxy.golang.org |
| Source | Repository |
| Docs | Documentation |
| JSON API | View JSON |
| CodeMeta | codemeta.json |
Package Details
| PURL |
pkg:golang/github.com/hashicorp/protostructure
spec |
| License | MIT |
| Namespace | github.com/hashicorp |
| First Release | almost 4 years ago |
| Last Synced | 10 days ago |