-
Notifications
You must be signed in to change notification settings - Fork 0
/
gen_protos.sh
executable file
·30 lines (29 loc) · 1.58 KB
/
gen_protos.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
mkdir -p proto
protoc -I$GOPATH/src/github.com/bootapp/proto-core \
--go_out=plugins=grpc:./proto \
$GOPATH/src/github.com/bootapp/proto-core/core_common.proto \
$GOPATH/src/github.com/bootapp/proto-core/dal_user.proto \
$GOPATH/src/github.com/bootapp/proto-core/dal_auth.proto
#------------------- grpc
protoc -I$GOPATH/src/github.com/bootapp/proto-core \
-I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
--go_out=plugins=grpc:./proto \
$GOPATH/src/github.com/bootapp/proto-core/srv_user.proto \
$GOPATH/src/github.com/bootapp/proto-core/srv_security.proto \
$GOPATH/src/github.com/bootapp/proto-core/srv_data_store.proto \
$GOPATH/src/github.com/bootapp/proto-core/srv_auth.proto
#------------------- restful gateway
protoc -I$GOPATH/src/github.com/bootapp/proto-core \
-I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
--grpc-gateway_out=logtostderr=true:./proto \
$GOPATH/src/github.com/bootapp/proto-core/srv_user.proto \
$GOPATH/src/github.com/bootapp/proto-core/srv_security.proto \
$GOPATH/src/github.com/bootapp/proto-core/srv_data_store.proto \
$GOPATH/src/github.com/bootapp/proto-core/srv_auth.proto
#------------------- swagger
#protoc -I$GOPATH/src/github.com/bootapp/proto-core \
# -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
# --swagger_out=logtostderr=true:./proto/core \
# $GOPATH/src/github.com/bootapp/proto-core/srv_user.proto \
# $GOPATH/src/github.com/bootapp/proto-core/srv_security.proto