Skip to content

Commit

Permalink
feat(grpc): add grpc/proto
Browse files Browse the repository at this point in the history
  • Loading branch information
eizyc committed Jun 25, 2024
1 parent fbe340e commit a5bc9ef
Show file tree
Hide file tree
Showing 11 changed files with 1,028 additions and 2 deletions.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,11 @@ server:
mock:
mockgen -package mockdb -destination db/mock/store.go github.com/eizyc/simplebank/db/sqlc Store

.PHONY: postgres createdb dropdb migrateup migrateup1 migratedown migratedown1 new_migration db_docs db_schema sqlc test server mock
proto:
rm -rf pb/*.go
protoc --proto_path=proto --go_out=pb --go_opt=paths=source_relative \
--go-grpc_out=pb --go-grpc_opt=paths=source_relative \
proto/*.proto


.PHONY: postgres createdb dropdb migrateup migrateup1 migratedown migratedown1 new_migration db_docs db_schema sqlc test server mock proto
11 changes: 10 additions & 1 deletion markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,13 @@ and `make db_docs`
```
npm install -g @dbml/cli
```
and `make db_schema`
and `make db_schema`

#### GRPC
##### Install
[Quick start](https://grpc.io/docs/languages/go/quickstart/)
```
brew install protobuf
go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]
```
240 changes: 240 additions & 0 deletions pb/rpc_create_user.pb.go

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

Loading

0 comments on commit a5bc9ef

Please sign in to comment.