protog

module
v0.0.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2022 License: Apache-2.0

README

A toolkit for working with protobuf and gRPC in Go

ci Godoc Slack chat

protog is a toolkit for Google's protobuf and gRPC projects. It contains a couple of Go packages and command line tools.

It is developed against the protobuf-go v2 API (google.golang.org/protobuf) which simplifies a lot of reflection-based protobuf code compared to v1 (github.com/golang/protobuf).

Build, test and install with make. See further options with make help.

pb

pb is a CLI tool for converting proto messages between different formats.

Sample usage:

# create base-massage.pb binary encoded proto message file from input JSON
pb -P cmd/pb/testdata/pbtest.pb -o base-message.pb BaseMessage '{"f" : "some_field"}'

# convert binary encoded proto message from pb file back to JSON
pb -P cmd/pb/testdata/pbtest.pb -O json BaseMessage @base-message.pb

Output:

{
  "f": "some_field"
}

Directories

Path Synopsis
cmd
pb
Package httprule provides utilities to map google.api.http annotation to net/http Request and Response types.
Package httprule provides utilities to map google.api.http annotation to net/http Request and Response types.
Package registry provides a type on top of protoregistry.Files that can be used as a protoregistry.ExtensionTypeResolver and a protoregistry.MessageTypeResolver.
Package registry provides a type on top of protoregistry.Files that can be used as a protoregistry.ExtensionTypeResolver and a protoregistry.MessageTypeResolver.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL