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

     1  syntax = "proto3";
     2  
     3  // Generate Unannotated Methods Echo Service
     4  // Similar to echo_service.proto but without annotations and without external configuration.
     5  //
     6  // Generate Unannotated Methods Echo Service API consists of a single service which returns
     7  // a message.
     8  package grpc.gateway.examples.internal.proto.examplepb;
     9  
    10  // Do not need annotations.proto, can still use well known types as usual
    11  import "google/protobuf/duration.proto";
    12  
    13  option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
    14  
    15  // GenerateUnboundMethodsSimpleMessage represents a simple message sent to the unannotated GenerateUnboundMethodsEchoService service.
    16  message GenerateUnboundMethodsSimpleMessage {
    17    // Id represents the message identifier.
    18    string id = 1;
    19    int64 num = 2;
    20    google.protobuf.Duration duration = 3;
    21  }
    22  
    23  // GenerateUnboundMethodsEchoService service responds to incoming echo requests.
    24  service GenerateUnboundMethodsEchoService {
    25    // Echo method receives a simple message and returns it.
    26    //
    27    // The message posted as the id parameter will also be
    28    // returned.
    29    rpc Echo(GenerateUnboundMethodsSimpleMessage) returns (GenerateUnboundMethodsSimpleMessage);
    30  
    31    // EchoBody method receives a simple message and returns it.
    32    rpc EchoBody(GenerateUnboundMethodsSimpleMessage) returns (GenerateUnboundMethodsSimpleMessage);
    33  
    34    // EchoDelete method receives a simple message and returns it.
    35    rpc EchoDelete(GenerateUnboundMethodsSimpleMessage) returns (GenerateUnboundMethodsSimpleMessage);
    36  }