protobuf-1

module
v0.0.0-...-6cab0cc Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2015 License: BSD-3-Clause

README

Protocol Buffers for Go with Gadgets

Stable Drone.io Tests: Build Status

Experimental Travis CI Matrix Builds: Build Status

Getting Started (Give me the speed I don't care about the rest)

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 you protocol buffers.

protoc --gofast_out=. myproto.proto
Getting started (I have heard about fields without pointers and more code generation)

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)
Getting started (I want more customization power over fields, speed, other serialization formats and tests, etc.)

Please visit the homepage for more documentation.

Installation

To install it, you must first have Go (at least version 1.2.2) installed (see http://golang.org/doc/install). Go 1.2.2, 1.3.3, 1.4.2 and 1.5 are continiuosly 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 alpha are continiously tested.

Finally run:

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

Proto3 is supported, but most of the new native types are not supported yet. See Proto3 Issue for more details.

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

Directories

Path Synopsis
dockertest
gogodocker-gen command
This packages is used to create compiled fieldpaths for selective unmarshaling.
This packages is used to create compiled fieldpaths for selective unmarshaling.
fieldpath-gen command
Generates fieldpath-generated.go and fieldpath-generated_test.go in github.com/gogo/protobuf/fieldpath , since writing code for each native go type and native proto type can be quite tedious.
Generates fieldpath-generated.go and fieldpath-generated_test.go in github.com/gogo/protobuf/fieldpath , since writing code for each native go type and native proto type can be quite tedious.
Package gogoproto provides extensions for protocol buffers to achieve:
Package gogoproto provides extensions for protocol buffers to achieve:
Package jsonpb provides marshalling/unmarshalling functionality between protocol buffer and JSON objects.
Package jsonpb provides marshalling/unmarshalling functionality between protocol buffer and JSON objects.
jsonpb_test_proto
Package jsonpb is a generated protocol buffer package.
Package jsonpb is a generated protocol buffer package.
plugin
defaultcheck
The defaultcheck plugin is used to check whether nullable is not used incorrectly.
The defaultcheck plugin is used to check whether nullable is not used incorrectly.
description
The description (experimental) plugin generates a Description method for each message.
The description (experimental) plugin generates a Description method for each message.
embedcheck
The embedcheck plugin is used to check whether embed is not used incorrectly.
The embedcheck plugin is used to check whether embed is not used incorrectly.
enumstringer
The enumstringer (experimental) plugin generates a String method for each enum.
The enumstringer (experimental) plugin generates a String method for each enum.
equal
The equal plugin generates an Equal and a VerboseEqual method for each message.
The equal plugin generates an Equal and a VerboseEqual method for each message.
face
The face plugin generates a function will be generated which can convert a structure which satisfies an interface (face) to the specified structure.
The face plugin generates a function will be generated which can convert a structure which satisfies an interface (face) to the specified structure.
gostring
The gostring plugin generates a GoString method for each message.
The gostring plugin generates a GoString method for each message.
grpc
Package grpc outputs gRPC service descriptions in Go code.
Package grpc outputs gRPC service descriptions in Go code.
marshalto
The marshalto plugin generates a Marshal and MarshalTo method for each message.
The marshalto plugin generates a Marshal and MarshalTo method for each message.
populate
The populate plugin generates a NewPopulated function.
The populate plugin generates a NewPopulated function.
size
The size plugin generates a Size method for each message.
The size plugin generates a Size method for each message.
stringer
The stringer plugin generates a String method for each message.
The stringer plugin generates a String method for each message.
testgen
The testgen plugin generates Test and Benchmark functions for each message.
The testgen plugin generates Test and Benchmark functions for each message.
union
The onlyone plugin generates code for the onlyone extension.
The onlyone plugin generates code for the onlyone extension.
unmarshal
The unmarshal plugin generates a Unmarshal method for each message.
The unmarshal plugin generates a Unmarshal method for each message.
Package proto converts data structures to and from the wire format of protocol buffers.
Package proto converts data structures to and from the wire format of protocol buffers.
proto3_proto
Package proto3_proto is a generated protocol buffer package.
Package proto3_proto is a generated protocol buffer package.
protoc-gen-gogo
descriptor
Package google_protobuf is a generated protocol buffer package.
Package google_protobuf is a generated protocol buffer package.
generator
The code generator for the plugin for the Google protocol buffer compiler.
The code generator for the plugin for the Google protocol buffer compiler.
plugin
Package google_protobuf_compiler is a generated protocol buffer package.
Package google_protobuf_compiler is a generated protocol buffer package.
Package test is a generated protocol buffer package.
Package test is a generated protocol buffer package.
casttype/combos/both
Package casttype is a generated protocol buffer package.
Package casttype is a generated protocol buffer package.
casttype/combos/marshaler
Package casttype is a generated protocol buffer package.
Package casttype is a generated protocol buffer package.
casttype/combos/neither
Package casttype is a generated protocol buffer package.
Package casttype is a generated protocol buffer package.
casttype/combos/unmarshaler
Package casttype is a generated protocol buffer package.
Package casttype is a generated protocol buffer package.
casttype/combos/unsafeboth
Package casttype is a generated protocol buffer package.
Package casttype is a generated protocol buffer package.
casttype/combos/unsafemarshaler
Package casttype is a generated protocol buffer package.
Package casttype is a generated protocol buffer package.
casttype/combos/unsafeunmarshaler
Package casttype is a generated protocol buffer package.
Package casttype is a generated protocol buffer package.
combos/both
Package test is a generated protocol buffer package.
Package test is a generated protocol buffer package.
combos/marshaler
Package test is a generated protocol buffer package.
Package test is a generated protocol buffer package.
combos/unmarshaler
Package test is a generated protocol buffer package.
Package test is a generated protocol buffer package.
combos/unsafeboth
Package test is a generated protocol buffer package.
Package test is a generated protocol buffer package.
combos/unsafemarshaler
Package test is a generated protocol buffer package.
Package test is a generated protocol buffer package.
combos/unsafeunmarshaler
Package test is a generated protocol buffer package.
Package test is a generated protocol buffer package.
custom
Package custom contains custom types for test and example purposes.
Package custom contains custom types for test and example purposes.
custom-dash-type
Package custom contains custom types for test and example purposes.
Package custom contains custom types for test and example purposes.
custombytesnonstruct
Package custombytesnonstruct is a generated protocol buffer package.
Package custombytesnonstruct is a generated protocol buffer package.
empty-issue70
Package empty is a generated protocol buffer package.
Package empty is a generated protocol buffer package.
enumprefix
Package enumprefix is a generated protocol buffer package.
Package enumprefix is a generated protocol buffer package.
enumstringer
Package enumstringer is a generated protocol buffer package.
Package enumstringer is a generated protocol buffer package.
example
Package test is a generated protocol buffer package.
Package test is a generated protocol buffer package.
group
Package group is a generated protocol buffer package.
Package group is a generated protocol buffer package.
importdedup
Package importdedup is a generated protocol buffer package.
Package importdedup is a generated protocol buffer package.
importdedup/subpkg
Package subpkg is a generated protocol buffer package.
Package subpkg is a generated protocol buffer package.
indeximport-issue72
Package indeximport is a generated protocol buffer package.
Package indeximport is a generated protocol buffer package.
indeximport-issue72/index
Package index is a generated protocol buffer package.
Package index is a generated protocol buffer package.
issue34
Package issue34 is a generated protocol buffer package.
Package issue34 is a generated protocol buffer package.
issue42order
Package issue42 is a generated protocol buffer package.
Package issue42 is a generated protocol buffer package.
issue8
Package proto is a generated protocol buffer package.
Package proto is a generated protocol buffer package.
mapsproto2/combos/both
Package proto2_maps is a generated protocol buffer package.
Package proto2_maps is a generated protocol buffer package.
mapsproto2/combos/marshaler
Package proto2_maps is a generated protocol buffer package.
Package proto2_maps is a generated protocol buffer package.
mapsproto2/combos/neither
Package proto2_maps is a generated protocol buffer package.
Package proto2_maps is a generated protocol buffer package.
mapsproto2/combos/unmarshaler
Package proto2_maps is a generated protocol buffer package.
Package proto2_maps is a generated protocol buffer package.
mapsproto2/combos/unsafeboth
Package proto2_maps is a generated protocol buffer package.
Package proto2_maps is a generated protocol buffer package.
mapsproto2/combos/unsafemarshaler
Package proto2_maps is a generated protocol buffer package.
Package proto2_maps is a generated protocol buffer package.
mapsproto2/combos/unsafeunmarshaler
Package proto2_maps is a generated protocol buffer package.
Package proto2_maps is a generated protocol buffer package.
mixbench command
moredefaults
Package moredefaults is a generated protocol buffer package.
Package moredefaults is a generated protocol buffer package.
packed
Package packed is a generated protocol buffer package.
Package packed is a generated protocol buffer package.
required
Package required is a generated protocol buffer package.
Package required is a generated protocol buffer package.
sizeunderscore
Package sizeunderscore is a generated protocol buffer package.
Package sizeunderscore is a generated protocol buffer package.
tags
Package tags is a generated protocol buffer package.
Package tags is a generated protocol buffer package.
theproto3/combos/both
Package theproto3 is a generated protocol buffer package.
Package theproto3 is a generated protocol buffer package.
theproto3/combos/marshaler
Package theproto3 is a generated protocol buffer package.
Package theproto3 is a generated protocol buffer package.
theproto3/combos/neither
Package theproto3 is a generated protocol buffer package.
Package theproto3 is a generated protocol buffer package.
theproto3/combos/unmarshaler
Package theproto3 is a generated protocol buffer package.
Package theproto3 is a generated protocol buffer package.
theproto3/combos/unsafeboth
Package theproto3 is a generated protocol buffer package.
Package theproto3 is a generated protocol buffer package.
theproto3/combos/unsafemarshaler
Package theproto3 is a generated protocol buffer package.
Package theproto3 is a generated protocol buffer package.
theproto3/combos/unsafeunmarshaler
Package theproto3 is a generated protocol buffer package.
Package theproto3 is a generated protocol buffer package.
unmarshalmerge
Package unmarshalmerge is a generated protocol buffer package.
Package unmarshalmerge is a generated protocol buffer package.
unrecognized
Package unrecognized is a generated protocol buffer package.
Package unrecognized is a generated protocol buffer package.
unrecognizedgroup
Package unrecognizedgroup is a generated protocol buffer package.
Package unrecognizedgroup is a generated protocol buffer package.
test/fast
Package vanity is a generated protocol buffer package.
Package vanity is a generated protocol buffer package.
test/faster
Package vanity is a generated protocol buffer package.
Package vanity is a generated protocol buffer package.
test/slick
Package vanity is a generated protocol buffer package.
Package vanity is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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