github.com/ronaksoft/rony@v0.16.26-0.20230807065236-1743dbfe6959/example/redirect/rpc/sample.proto (about)

     1  syntax = "proto3";
     2  package rpc;
     3  import "options.proto";
     4  option go_package = "github.com/ronaksoft/rony/example/redirect/rpc";
     5  
     6  // Sample
     7  service Sample {
     8      rpc InfoWithClientRedirect (InfoRequest) returns (InfoResponse) {
     9          option (rony_rest) = {
    10              method: "get"
    11              path: "/info/client-redirect/:ReplicaSet/:RandomText"
    12              json_encode: true
    13          };
    14      }
    15      rpc InfoWithServerRedirect (InfoRequest) returns (InfoResponse) {
    16          option (rony_rest) = {
    17              method: "get"
    18              path: "/info/server-redirect/:ReplicaSet/:RandomText"
    19              json_encode: true
    20          };
    21      }
    22  }
    23  
    24  // InfoRequest
    25  message InfoRequest {
    26      uint64 ReplicaSet = 1;
    27      string RandomText = 2;
    28  }
    29  
    30  // InfoResponse
    31  message InfoResponse {
    32      string ServerID = 1;
    33      string RandomText = 2;
    34  }