github.com/grpc-ecosystem/grpc-gateway/v2@v2.19.1/examples/internal/proto/examplepb/stream.proto (about)

     1  syntax = "proto3";
     2  
     3  package grpc.gateway.examples.internal.proto.examplepb;
     4  
     5  import "examples/internal/proto/examplepb/a_bit_of_everything.proto";
     6  import "examples/internal/proto/sub/message.proto";
     7  import "google/api/annotations.proto";
     8  import "google/api/httpbody.proto";
     9  import "google/protobuf/empty.proto";
    10  
    11  option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
    12  
    13  // Defines some more operations to be added to ABitOfEverythingService
    14  service StreamService {
    15    rpc BulkCreate(stream ABitOfEverything) returns (google.protobuf.Empty) {
    16      option (google.api.http) = {
    17        post: "/v1/example/a_bit_of_everything/bulk"
    18        body: "*"
    19      };
    20    }
    21    rpc List(Options) returns (stream ABitOfEverything) {
    22      option (google.api.http) = {get: "/v1/example/a_bit_of_everything"};
    23    }
    24    rpc BulkEcho(stream grpc.gateway.examples.internal.proto.sub.StringMessage) returns (stream grpc.gateway.examples.internal.proto.sub.StringMessage) {
    25      option (google.api.http) = {
    26        post: "/v1/example/a_bit_of_everything/echo"
    27        body: "*"
    28      };
    29    }
    30  
    31    rpc Download(Options) returns (stream google.api.HttpBody) {
    32      option (google.api.http) = {get: "/v1/example/download"};
    33    }
    34  }
    35  
    36  message Options {
    37    bool error = 1;
    38  }