Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Commit

Permalink
grpc initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Minish144 committed Sep 30, 2021
1 parent 69bc2f7 commit 6bffc66
Show file tree
Hide file tree
Showing 22 changed files with 1,773 additions and 25 deletions.
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
generate:
rm -rf gen/{pb,clean_proto,swagger}/{*.go,*.proto,*.json}
mkdir -p gen/{pb,swagger}

protoc \
-I=proto/ \
-I=${GOPATH}/src/ \
-I=${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/ \
-I=${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
--go_out=./ \
--validate_out=lang=go:./ \
--grpc-gateway_out=logtostderr=true:. \
--swagger_out=allow_merge=true,merge_file_name=api:./gen/swagger/ proto/*.proto

protoc \
-I=proto/ \
-I=${GOPATH}/src/ \
-I=${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/ \
-I=${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
--go-grpc_out=./ proto/api.proto
8 changes: 6 additions & 2 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
server:
interface: 0.0.0.0
port: 3200
grpc:
interface: 0.0.0.0
port: 3200
http:
interface: 0.0.0.0
port: 3201

modem:
comport: /dev/ttyUSB0
Expand Down
89 changes: 89 additions & 0 deletions gen/pb/api.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

169 changes: 169 additions & 0 deletions gen/pb/api.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions gen/pb/api.pb.validate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6bffc66

Please sign in to comment.