protobuf

module
v0.0.0-...-146d3ae Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2015 License: BSD-3-Clause

README

Protocol Buffers for Go with Gadgets

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).

Next, install the standard protocol buffer implementation from https://github.com/google/protobuf; you must be running version 2.3, 2.4.1, 2.5, 2.6 or 2.6.1.

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 since a specification has not been released yet, this support is limited.

Directories

Path Synopsis
dockertest
This packages is used to create compiled fieldpaths for selective unmarshaling.
This packages is used to create compiled fieldpaths for selective unmarshaling.
fieldpath-gen
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:
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.
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.
internal/grpc
Package grpc outputs gRPC service descriptions in Go code.
Package grpc outputs gRPC service descriptions in Go code.
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.
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.
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.
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 mapsproto2 is a generated protocol buffer package.
Package mapsproto2 is a generated protocol buffer package.
mapsproto2/combos/marshaler
Package mapsproto2 is a generated protocol buffer package.
Package mapsproto2 is a generated protocol buffer package.
mapsproto2/combos/neither
Package mapsproto2 is a generated protocol buffer package.
Package mapsproto2 is a generated protocol buffer package.
mapsproto2/combos/unmarshaler
Package mapsproto2 is a generated protocol buffer package.
Package mapsproto2 is a generated protocol buffer package.
mapsproto2/combos/unsafeboth
Package mapsproto2 is a generated protocol buffer package.
Package mapsproto2 is a generated protocol buffer package.
mapsproto2/combos/unsafemarshaler
Package mapsproto2 is a generated protocol buffer package.
Package mapsproto2 is a generated protocol buffer package.
mapsproto2/combos/unsafeunmarshaler
Package mapsproto2 is a generated protocol buffer package.
Package mapsproto2 is a generated protocol buffer package.
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