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

feat: use google.rpc.Status #411

Merged
1 commit merged into from
Nov 17, 2022
Merged
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: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "third_party/googleapis"]
path = third_party/googleapis
url = https://github.com/googleapis/googleapis.git
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad to see that importing the proto file this way works! In my previous attempts, I copied the file from googleapis locally in api/google/grpc/status.proto but had issues with the server code that was serializing the response at runtime.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ mocks: ${MOCKS_GENERATED}
docs: ${REFERENCE_DOC}

${REFERENCE_DOC}: ${API_DIR}/open_saves.proto
${PROTOC} --doc_out=$(dir $@) --doc_opt=markdown,$(notdir $@) $<
${PROTOC} -I${API_DIR} -Ithird_party/googleapis --doc_out=$(dir $@) --doc_opt=markdown,$(notdir $@) $<

${SERVER_BIN}: cmd/server/main.go protos FORCE
go build -o $@ $<
Expand Down
4 changes: 2 additions & 2 deletions api/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

//go:build generate

//go:generate protoc --go_out=. --go_opt=paths=source_relative open_saves.proto
//go:generate protoc --go-grpc_out=. --go-grpc_opt=paths=source_relative open_saves.proto
//go:generate protoc -I. -I../third_party/googleapis --go_out=. --go_opt=paths=source_relative open_saves.proto
//go:generate protoc -I. -I../third_party/googleapis --go-grpc_out=. --go-grpc_opt=paths=source_relative open_saves.proto

package opensaves
Loading