pb

module
v0.0.0-...-dbc791b Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2017 License: MIT

README

CircleCI Go Report Card GoDoc GoDoc MIT License

pb

Compiled well-known types from google/protobuf, compiled types from googleapis, and my protocol buffer standard library.

Compiled for both golang/protobuf and gogo/protobuf.

Types handled in github.com/golang/protobuf/ptypes and github.com/gogo/protobuf/types are not compiled.

Successor to go.pedge.io/google-protobuf and go.pedge.io/googleapis, plus the extra protos in proto/pb, and lots more fun from generated code in etc/tmpl. Specifically check out the geo and money packages.

Using

You need to put the proto directory on protoc's import path:

protoc -I /path/to/go/src/go.pedge.io/pb/proto ...

protoeasy will directly import all proto files from the proto directory to compile against unless otherwise specified, so for example to use proto/pb/money/money.proto, just do:

import "pb/money/money".proto

If using golang/protobuf, use the go directory. If using gogo/protobuf, use the gogo directory. Both directories have the same structure and same code, just different protocol buffer library.

There is additional code that is not generated by the plugins in a few packages, check out etc/tmpl and it should make sense where it is.

Exceptions

Use these packages instead for the protos inside these files:

  • google/api/annotations.proto: github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api
  • google/api/http.proto: github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api
golang/protobuf
  • google/protobuf/descriptor.proto: github.com/golang/protobuf/protoc-gen-go/descriptor
gogo/protobuf
  • google/protobuf/descriptor.proto: github.com/gogo/protobuf/protoc-gen-gogo/descriptor

Directories

Path Synopsis
etc
go
gogo

Jump to

Keyboard shortcuts

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