1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
syntax = "proto3";
package grpc.gateway.examples.internal.helloworld;
import "google/api/annotations.proto";
import "google/protobuf/wrappers.proto";
option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/helloworld";
service Greeter {
rpc SayHello(HelloRequest) returns (HelloReply) {
option (google.api.http) = {
get: "/say/{name}"
additional_bindings: {
get: "/say/strval/{strVal}",
}
additional_bindings: {
get: "/say/floatval/{floatVal}",
}
additional_bindings: {
get: "/say/doubleval/{doubleVal}",
}
additional_bindings: {
get: "/say/boolval/{boolVal}",
}
additional_bindings: {
get: "/say/bytesval/{bytesVal}",
}
additional_bindings: {
get: "/say/int32val/{int32Val}",
}
additional_bindings: {
get: "/say/uint32val/{uint32Val}",
}
additional_bindings: {
get: "/say/int64val/{int64Val}",
}
additional_bindings: {
get: "/say/uint64val/{uint64Val}",
}
};
}
}
message HelloRequest {
string name = 1;
google.protobuf.StringValue strVal = 2;
google.protobuf.FloatValue floatVal = 3;
google.protobuf.DoubleValue doubleVal = 4;
google.protobuf.BoolValue boolVal = 5;
google.protobuf.BytesValue bytesVal = 6;
google.protobuf.Int32Value int32Val = 7;
google.protobuf.UInt32Value uint32Val = 8;
google.protobuf.Int64Value int64Val = 9;
google.protobuf.UInt64Value uint64Val = 10;
}
message HelloReply {
string message = 1;
}
|