Skip to content

Commit

Permalink
update examples/transcoding/best-practice example
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielLiu1123 committed Jan 13, 2025
1 parent 50a9855 commit 43d2c52
Show file tree
Hide file tree
Showing 8 changed files with 280 additions and 13 deletions.
18 changes: 18 additions & 0 deletions examples/transcoding/best-practice/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Run

```bash
cd "$(git rev-parse --show-toplevel)"
./gradlew :examples:transcoding:best-practice:bp-server:bootRun
```

Use grpcurl:

```bash
grpcurl -plaintext -d '{"id": 111}' localhost:9090 user.v1.UserService/GetUser
```

Use curl:

```bash
curl http://localhost:8080/v1/users/111
```
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ option go_package = "github.com/your/repo/user/v1;user_v1";
message User {
int64 id = 1;
string name = 2;
Gender gender = 3;

enum Gender {
GENDER_UNSPECIFIED = 0;
MALE = 1;
FEMALE = 2;
}
}

message GetUserRequest {
Expand Down

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

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

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

Loading

0 comments on commit 43d2c52

Please sign in to comment.