-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(grpc-gateway) use grpcbin in tests (#6)
- Loading branch information
Showing
3 changed files
with
15 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,28 @@ | ||
syntax = "proto3"; | ||
|
||
option java_multiple_files = true; | ||
option java_package = "io.grpc.examples.helloworld"; | ||
option java_outer_classname = "HelloWorldProto"; | ||
package hello; | ||
|
||
package helloworld; | ||
|
||
// The greeting service definition. | ||
service Greeter { | ||
// Sends a greeting | ||
rpc SayHello (HelloRequest) returns (HelloReply) { | ||
service HelloService { | ||
rpc SayHello(HelloRequest) returns (HelloResponse) { | ||
option (google.api.http) = { | ||
// https://github.com/googleapis/googleapis/blob/master/google/api/http.proto | ||
// HTTP | gRPC | ||
// -----|----- | ||
// `GET /v1/messages/123456` | `HelloRequest(name: "123456")` | ||
get: "/v1/messages/{name}" | ||
// `GET /v1/messages/123456` | `HelloRequest(greeting: "123456")` | ||
get: "/v1/messages/{greeting}" | ||
additional_bindings { | ||
get: "/v1/messages/legacy/{name=**}" | ||
get: "/v1/messages/legacy/{greeting=**}" | ||
} | ||
post: "/v1/messages/" | ||
body: "*" | ||
}; | ||
} | ||
} | ||
}; | ||
} | ||
|
||
// The request message containing the user's name. | ||
message HelloRequest { | ||
string name = 1; | ||
required string greeting = 1; | ||
} | ||
|
||
// The response message containing the greetings | ||
message HelloReply { | ||
string message = 1; | ||
message HelloResponse { | ||
required string reply = 1; | ||
} |