gogo/protobuf


Protocol Buffers for Go with Gadgets

License: Other

Language: Go

Keywords: go, golang, grpc, protobuf, protocol-buffers


Protocol Buffers for Go with Gadgets

Build Status

gogoprotobuf is a fork of golang/protobuf with extra code generation features.

This code generation is used to achieve:

  • fast marshalling and unmarshalling
  • more canonical Go structures
  • goprotobuf compatibility
  • less typing by optionally generating extra helper code
  • peace of mind by optionally generating test and benchmark code
  • other serialization formats

Keeping track of how up to date gogoprotobuf is relative to golang/protobuf is done in this issue

Users

These projects use gogoprotobuf:

Please lets us know if you are using gogoprotobuf by posting on our GoogleGroup.

Mentioned

Getting Started

There are several ways to use gogoprotobuf, but for all you need to install go and protoc. After that you can choose:

  • Speed
  • More Speed and more generated code
  • Most Speed and most customization

Installation

To install it, you must first have Go (at least version 1.3.3) installed (see http://golang.org/doc/install). Go 1.5.4, 1.6.3 and 1.7.1 are continuously tested.

Next, install the standard protocol buffer implementation from https://github.com/google/protobuf. Most versions from 2.3.1 should not give any problems, but 2.5.0, 2.6.1 and 3.0.2 are continuously tested.

Speed

Install the protoc-gen-gofast binary

go get github.com/gogo/protobuf/protoc-gen-gofast

Use it to generate faster marshaling and unmarshaling go code for your protocol buffers.

protoc --gofast_out=. myproto.proto

This does not allow you to use any of the other gogoprotobuf extensions.

More Speed and more generated code

Fields without pointers cause less time in the garbage collector. More code generation results in more convenient methods.

Other binaries are also included:

protoc-gen-gogofast (same as gofast, but imports gogoprotobuf)
protoc-gen-gogofaster (same as gogofast, without XXX_unrecognized, less pointer fields)
protoc-gen-gogoslick (same as gogofaster, but with generated string, gostring and equal methods)

Installing any of these binaries is easy. Simply run:

go get github.com/gogo/protobuf/proto
go get github.com/gogo/protobuf/{binary}
go get github.com/gogo/protobuf/gogoproto

These binaries allow you to using gogoprotobuf extensions.

Most Speed and most customization

Customizing the fields of the messages to be the fields that you actually want to use removes the need to copy between the structs you use and structs you use to serialize. gogoprotobuf also offers more serialization formats and generation of tests and even more methods.

Please visit the extensions page for more documentation.

Install protoc-gen-gogo:

go get github.com/gogo/protobuf/proto
go get github.com/gogo/protobuf/jsonpb
go get github.com/gogo/protobuf/protoc-gen-gogo
go get github.com/gogo/protobuf/gogoproto

GRPC

It works the same as golang/protobuf, simply specify the plugin. Here is an example using gofast:

protoc --gofast_out=plugins=grpc:. my.proto

Project Statistics

Sourcerank 12
Repository Size 35.1 MB
Stars 2,869
Forks 383
Watchers 92
Open issues 120
Dependencies 0
Contributors 20
Tags 6
Created
Last updated
Last pushed

Top Contributors See all

Walter Schulze Clayton Coleman Tamir Duberstein John Tuley Patrick Anton Povarov Denys Smirnov Dwayne Schultz Laurent Todd Eisenberger DongYun Kang Albert Strasheim Georg Apitz Gustav Paul Johan Brandhorst Tormod Erevik Lea Tristan Rice Stephen Day Alexander Staubo

Packages Referencing this Repo

github.com/gogo/protobuf/test/issue530
Protocol Buffers for Go with Gadgets
Latest release v1.0.0 - Published - 2.87K stars
github.com/gogo/protobuf/test/typedeclimport
Protocol Buffers for Go with Gadgets
Latest release v1.0.0 - Published - 2.87K stars
github.com/gogo/protobuf/fieldpath/fieldpath-gen
Protocol Buffers for Go with Gadgets
Latest release v1.0.0 - Published - 2.87K stars
github.com/gogo/protobuf/plugin/defaultcheck
Protocol Buffers for Go with Gadgets
Latest release v1.0.0 - Published - 2.87K stars
github.com/gogo/protobuf/test/issue503
Protocol Buffers for Go with Gadgets
Latest release v1.0.0 - Published - 2.87K stars
github.com/gogo/protobuf/protoc-min-version
Protocol Buffers for Go with Gadgets
Latest release v1.0.0 - Published - 2.87K stars
github.com/gogo/protobuf/plugin/grpc
Protocol Buffers for Go with Gadgets
This package is no longer available on Go
github.com/gogo/protobuf/proto/proto3_proto
Protocol Buffers for Go with Gadgets
Latest release v1.0.0 - Published - 2.87K stars
github.com/gogo/protobuf/vanity
Protocol Buffers for Go with Gadgets
Latest release v1.0.0 - Published - 2.87K stars
github.com/gogo/protobuf/protoc-gen-gogo
Protocol Buffers for Go with Gadgets
Latest release v1.0.0 - Published - 2.87K stars
github.com/gogo/protobuf/io
Protocol Buffers for Go with Gadgets
Latest release v1.0.0 - Published - 2.87K stars
github.com/gogo/protobuf/protoc-gen-gogo/version
Protocol Buffers for Go with Gadgets
Latest release v1.0.0 - Published - 2.87K stars
github.com/gogo/protobuf/plugin/gostring
Protocol Buffers for Go with Gadgets
Latest release v1.0.0 - Published - 2.87K stars
github.com/gogo/protobuf/test/issue8
Protocol Buffers for Go with Gadgets
Latest release v1.0.0 - Published - 2.87K stars
github.com/gogo/protobuf/test/enumstringer
Protocol Buffers for Go with Gadgets
Latest release v1.0.0 - Published - 2.87K stars
github.com/gogo/protobuf/plugin/marshalto
Protocol Buffers for Go with Gadgets
Latest release v1.0.0 - Published - 2.87K stars
github.com/gogo/protobuf/plugin/testgen
Protocol Buffers for Go with Gadgets
Latest release v1.0.0 - Published - 2.87K stars
github.com/gogo/protobuf/plugin/stringer
Protocol Buffers for Go with Gadgets
Latest release v1.0.0 - Published - 2.87K stars
github.com/gogo/protobuf/test/mapdefaults/combos/both
Protocol Buffers for Go with Gadgets
Latest release v1.0.0 - Published - 2.87K stars
github.com/gogo/protobuf/test/mapdefaults/combos/marshaler
Protocol Buffers for Go with Gadgets
Latest release v1.0.0 - Published - 2.87K stars

Recent Tags See all

v1.0.0 February 02, 2018
v0.5 October 07, 2017
v0.4 March 07, 2017
v0.3 August 24, 2016
v0.2 March 22, 2016
v0.1 August 28, 2015

Interesting Forks See all

andres-erbsen/protobuf
Protocol Buffers for Go with Gadgets
Go - Other - Last pushed - 1 stars - 1 forks
VividCortex/protobuf
Protocol Buffers for Go with Gadgets
Go - Other - Last pushed - 1 stars
vrecan/protobuf
Protocol Buffers for Go with Gadgets
Go - Other - Updated - 1 stars

Something wrong with this page? Make a suggestion

Last synced: 2016-11-24 15:48:39 UTC

Login to resync this repository