...

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

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

     1syntax = "proto3";
     2
     3package grpc.gateway.examples.internal.proto.examplepb;
     4
     5import "google/api/annotations.proto";
     6
     7option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
     8
     9message ResponseBodyIn {
    10  string data = 1;
    11}
    12
    13message ResponseBodyOut {
    14  message Response {
    15    string data = 1;
    16  }
    17  Response response = 2;
    18}
    19
    20message RepeatedResponseBodyOut {
    21  message Response {
    22    string data = 1;
    23    enum ResponseType {
    24      // UNKNOWN
    25      UNKNOWN = 0;
    26      // A is 1
    27      A = 1;
    28      // B is 2
    29      B = 2;
    30    }
    31    ResponseType type = 3;
    32  }
    33  repeated Response response = 2;
    34}
    35
    36message RepeatedResponseStrings {
    37  repeated string values = 1;
    38}
    39
    40service ResponseBodyService {
    41  rpc GetResponseBody(ResponseBodyIn) returns (ResponseBodyOut) {
    42    option (google.api.http) = {
    43      get: "/responsebody/{data}"
    44      response_body: "response"
    45    };
    46  }
    47  rpc ListResponseBodies(ResponseBodyIn) returns (RepeatedResponseBodyOut) {
    48    option (google.api.http) = {
    49      get: "/responsebodies/{data}"
    50      response_body: "response"
    51    };
    52  }
    53  rpc ListResponseStrings(ResponseBodyIn) returns (RepeatedResponseStrings) {
    54    option (google.api.http) = {
    55      get: "/responsestrings/{data}"
    56      response_body: "values"
    57    };
    58  }
    59
    60  rpc GetResponseBodyStream(ResponseBodyIn) returns (stream ResponseBodyOut) {
    61    option (google.api.http) = {
    62      get: "/responsebody/stream/{data}"
    63      response_body: "response"
    64    };
    65  }
    66}

View as plain text