Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for money #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion generate_google_protos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ PROTOS=("
protobuf/src/google/protobuf/struct.proto
protobuf/src/google/protobuf/timestamp.proto
protobuf/src/google/protobuf/wrappers.proto
googleapis/google/type/money.proto
")

rm -rf ./lib/google_protos/*

for file in $PROTOS; do
protoc -I ./protobuf/src/google/protobuf/ --elixir_out=plugins=grpc:./lib/google_protos $file
protoc -I ./${file%/*}/ --elixir_out=plugins=grpc:./lib/google_protos $file
done
1 change: 1 addition & 0 deletions googleapis
Submodule googleapis added at 98c303
8 changes: 8 additions & 0 deletions lib/google_protos/money.pb.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
defmodule Google.Type.Money do
@moduledoc false
use Protobuf, protoc_gen_elixir_version: "0.11.0", syntax: :proto3

field :currency_code, 1, type: :string, json_name: "currencyCode"
field :units, 2, type: :int64
field :nanos, 3, type: :int32
end