All Projects → emicklei → Proto

emicklei / Proto

Licence: mit
parser for Google ProtocolBuffers definition

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Proto

agentgo
Hi! Agentgo is a tool for making remote command executions from server to client with golang, protocol buffers (protobuf) and grpc.
Stars: ✭ 15 (-95.82%)
Mutual labels:  protobuf, protocol-buffers
protocell
Conjures up convenient OCaml types and serialization functions based on protobuf definition files
Stars: ✭ 18 (-94.99%)
Mutual labels:  protobuf, protocol-buffers
grpc-chat
Simple Chat Server/Client implemented with gRPC
Stars: ✭ 107 (-70.19%)
Mutual labels:  protobuf, protocol-buffers
protodoc
protodoc generates Protocol Buffer documentation.
Stars: ✭ 43 (-88.02%)
Mutual labels:  protobuf, protocol-buffers
ppx deriving protobuf
A Protocol Buffers codec generator for OCaml
Stars: ✭ 76 (-78.83%)
Mutual labels:  protobuf, protocol-buffers
goprotoc
Library for writing protoc plugins in Go; also includes a pure-Go protoc replacement
Stars: ✭ 73 (-79.67%)
Mutual labels:  protobuf, protocol-buffers
javascript-serialization-benchmark
Comparison and benchmark of JavaScript serialization libraries (Protocol Buffer, Avro, BSON, etc.)
Stars: ✭ 54 (-84.96%)
Mutual labels:  protobuf, protocol-buffers
protoconfig
ProtoConfig 1.0: Open Standard for using, defining, and consuming software configuration input in a unified way.
Stars: ✭ 24 (-93.31%)
Mutual labels:  protobuf, protocol-buffers
rails-microservices-book
A guide to building distributed Ruby on Rails applications using Protocol Buffers, NATS and RabbitMQ
Stars: ✭ 23 (-93.59%)
Mutual labels:  protobuf, protocol-buffers
nimpb
Protocol Buffers for Nim
Stars: ✭ 29 (-91.92%)
Mutual labels:  protobuf, protocol-buffers
makego
Makefile setup for our Golang projects.
Stars: ✭ 65 (-81.89%)
Mutual labels:  protobuf, protocol-buffers
AndTTT
🎲 Simple tic tac toe game for Android
Stars: ✭ 15 (-95.82%)
Mutual labels:  protobuf, protocol-buffers
stockholm
💵 Modern Python library for working with money and monetary amounts. Human friendly and flexible approach for development. 100% test coverage + built-in support for GraphQL and Protocol Buffers transports using current best-practices.
Stars: ✭ 26 (-92.76%)
Mutual labels:  protobuf, protocol-buffers
protoc-plugin
A protoc compiler plugin for Clojure applications
Stars: ✭ 28 (-92.2%)
Mutual labels:  protobuf, protocol-buffers
kafka-protobuf-serde
Serializer/Deserializer for Kafka to serialize/deserialize Protocol Buffers messages
Stars: ✭ 52 (-85.52%)
Mutual labels:  protobuf, protocol-buffers
protobuf-d
Protocol Buffers Compiler Plugin and Support Library for D
Stars: ✭ 32 (-91.09%)
Mutual labels:  protobuf, protocol-buffers
protobuf-example-java
Companion Repository for my Protocol Buffers course
Stars: ✭ 67 (-81.34%)
Mutual labels:  protobuf, protocol-buffers
protobuf-ipc-example
Protocol buffer IPC example
Stars: ✭ 19 (-94.71%)
Mutual labels:  protobuf, protocol-buffers
protopatch
protoc-gen-go patch utility
Stars: ✭ 58 (-83.84%)
Mutual labels:  protobuf, protocol-buffers
ocaml-pb-plugin
A protoc plugin for generating OCaml code from protobuf (.proto) files.
Stars: ✭ 18 (-94.99%)
Mutual labels:  protobuf, protocol-buffers

proto

Build Status Go Report Card GoDoc

Package in Go for parsing Google Protocol Buffers .proto files version 2 + 3

install

go get -u -v github.com/emicklei/proto

usage

package main

import (
	"fmt"
	"os"

	"github.com/emicklei/proto"
)

func main() {
	reader, _ := os.Open("test.proto")
	defer reader.Close()

	parser := proto.NewParser(reader)
	definition, _ := parser.Parse()

	proto.Walk(definition,
		proto.WithService(handleService),
		proto.WithMessage(handleMessage))
}

func handleService(s *proto.Service) {
	fmt.Println(s.Name)
}

func handleMessage(m *proto.Message) {
	fmt.Println(m.Name)
}

validation

Current parser implementation is not completely validating .proto definitions. In many but not all cases, the parser will report syntax errors when reading unexpected charaters or tokens. Use some linting tools (e.g. https://github.com/uber/prototool) or protoc for full validation.

contributions

See proto-contrib for other contributions on top of this package such as protofmt, proto2xsd and proto2gql. protobuf2map is a small package for inspecting serialized protobuf messages using its .proto definition.

© 2017, ernestmicklei.com. MIT License. Contributions welcome.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].