github.com/ronaksoft/rony@v0.16.26-0.20230807065236-1743dbfe6959/example/echo/rpc/sample.proto (about) 1 syntax = "proto3"; 2 package service; 3 import "options.proto"; 4 option go_package = "github.com/ronaksoft/rony/example/echo/rpc/service"; 5 6 // Sample 7 service Sample { 8 option (rony_cli) = {}; 9 rpc Echo (EchoRequest) returns (EchoResponse) { 10 option (rony_rest) = { 11 method: "get" 12 path: "/echo/:ID/:Random" 13 json_encode: true 14 bind_path_param: "Random=RandomText" 15 }; 16 } 17 } 18 19 // EchoRequest 20 message EchoRequest { 21 int64 ID = 1; 22 string RandomText = 2; 23 } 24 25 // EchoResponse 26 message EchoResponse { 27 int64 ReqID = 1; 28 string RandomText = 2; 29 }