github.com/ronaksoft/rony@v0.16.26-0.20230807065236-1743dbfe6959/internal/testEnv/pb/service/service.proto (about)

     1  syntax = "proto3";
     2  package service;
     3  option go_package = "./;service";
     4  import "options.proto";
     5  
     6  service Sample {
     7    option (rony_cli) = {};
     8    rpc Echo (EchoRequest) returns (EchoResponse) {
     9      option (rony_rest) = {
    10        method: "get"
    11        path: "/echo/:replica_set"
    12        json_encode: true
    13      };
    14    }
    15    rpc Set (SetRequest) returns (SetResponse) {
    16      option (rony_rest) = {
    17        method: "post"
    18        path: "/set"
    19      };
    20    }
    21    rpc Get (GetRequest) returns (GetResponse) {
    22      option (rony_rest) = {
    23        method: "get"
    24        path: "/req/:Key/something"
    25      };
    26    }
    27    rpc EchoTunnel (EchoRequest) returns (EchoResponse) {
    28      option (rony_rest) = {
    29        method: "get"
    30        path: "/echo_tunnel/:X/:YY"
    31        bind_path_param: "X=Int"
    32        bind_path_param: "YY=Timestamp"
    33      };
    34    }
    35    rpc EchoInternal (EchoRequest) returns (EchoResponse) {
    36      option (rony_internal) = true;
    37    }
    38    rpc EchoDelay (EchoRequest) returns (EchoResponse);
    39  }
    40  
    41  message GetRequest {
    42    bytes Key = 1 [(rony_default) = "somekey", (rony_help) = "enter some random key"];
    43  }
    44  
    45  message GetResponse {
    46    bytes Key = 1;
    47    bytes Value = 2;
    48  }
    49  
    50  message SetRequest {
    51    bytes Key = 1;
    52    bytes Value = 2;
    53  }
    54  
    55  message SetResponse {
    56    bool OK = 1;
    57  }
    58  
    59  message EchoRequest {
    60    int64 Int = 1;
    61    int64 Timestamp = 3;
    62    uint64 replica_set = 4;
    63    bytes SomeData = 5;
    64  }
    65  
    66  message EchoResponse {
    67    int64 Int = 1;
    68    string Responder = 2;
    69    int64 Timestamp = 4;
    70    int64 Delay = 5;
    71    string ServerID = 6;
    72    bytes SomeData = 7;
    73  }
    74  
    75  message Message1 {
    76    int64 Param1 = 1;
    77    string Param2 = 2;
    78    Message2 M2 = 3;
    79    repeated Message2 M2S = 4;
    80  }
    81  
    82  message Message2 {
    83    fixed32 Param1 = 1;
    84    bytes P2 = 2;
    85    repeated int32 P3 = 3;
    86    Message1 M1 = 4;
    87  }
    88