https://github.com/niku/elixir_protobuf
https://github.com/niku/elixir_protobuf
Last synced: 28 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/niku/elixir_protobuf
- Owner: niku
- Created: 2018-11-15T12:55:24.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-05T11:42:28.000Z (almost 7 years ago)
- Last Synced: 2025-01-12T16:41:33.391Z (over 1 year ago)
- Language: Elixir
- Homepage:
- Size: 44.9 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Protobuf
**TODO: Add description**
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `protobuf` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:protobuf, "~> 0.1.0"}
]
end
```
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/protobuf](https://hexdocs.pm/protobuf).
## Integration Testing
To generate a python code `test/integration/integrationtest_pb2.py` for integration tests from `.proto` files:
```
$ docker run --rm -v $(pwd):/app niku/pytnoh3-protobuf \
protoc \
-I test/integration/proto \
--python_out=test/integration/python \
test/integration/proto/integrationtest.proto
```
To generate json files based on protocol buffer messages for integration tests from `test/integration/input.yaml`:
```
$ docker run --rm -v $(pwd):/app niuk/python3-protobuf \
python3 test/integration/python/generate_messages.py
```
An object in json includes key that is expected value and value that is base64 encoded protocol buffer message representation.