Skip to content
This repository has been archived by the owner on Sep 29, 2020. It is now read-only.

sr/pb

Repository files navigation

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.

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/gengo/grpc-gateway/third_party/googleapis/google/api
  • google/api/http.proto: github.com/gengo/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

About

My standard protobuf library, google/protobuf, and googleapis for golang/protobuf and gogo/protobuf

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published