...

Text file src/github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/helloworld/helloworld.proto

Documentation: github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/helloworld

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

View as plain text