github.com/grpc-ecosystem/grpc-gateway/v2@v2.19.1/examples/internal/proto/examplepb/unannotated_echo_service.proto (about) 1 syntax = "proto3"; 2 3 // Unannotated Echo Service 4 // Similar to echo_service.proto but without annotations. See 5 // unannotated_echo_service.yaml for the equivalent of the annotations in 6 // gRPC API configuration format. 7 // 8 // Echo Service API consists of a single service which returns 9 // a message. 10 package grpc.gateway.examples.internal.proto.examplepb; 11 12 // Do not need annotations.proto, can still use well known types as usual 13 import "google/protobuf/duration.proto"; 14 15 option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb;examplepb"; 16 17 // Embedded represents a message embedded in SimpleMessage. 18 message UnannotatedEmbedded { 19 oneof mark { 20 int64 progress = 1; 21 string note = 2; 22 } 23 } 24 25 message UnannotatedNestedMessage { 26 string n_id = 1; 27 string val = 2; 28 } 29 30 // UnannotatedSimpleMessage represents a simple message sent to the unannotated Echo service. 31 message UnannotatedSimpleMessage { 32 // Id represents the message identifier. 33 string id = 1; 34 int64 num = 2; 35 google.protobuf.Duration duration = 3; 36 oneof code { 37 int64 line_num = 4; 38 string lang = 5; 39 } 40 UnannotatedEmbedded status = 6; 41 oneof ext { 42 int64 en = 7; 43 UnannotatedEmbedded no = 8; 44 } 45 string resource_id = 9; 46 UnannotatedNestedMessage n_id = 10; 47 } 48 49 // Echo service responds to incoming echo requests. 50 service UnannotatedEchoService { 51 // Echo method receives a simple message and returns it. 52 // 53 // The message posted as the id parameter will also be 54 // returned. 55 rpc Echo(UnannotatedSimpleMessage) returns (UnannotatedSimpleMessage); 56 57 // EchoBody method receives a simple message and returns it. 58 rpc EchoBody(UnannotatedSimpleMessage) returns (UnannotatedSimpleMessage); 59 60 // EchoDelete method receives a simple message and returns it. 61 rpc EchoDelete(UnannotatedSimpleMessage) returns (UnannotatedSimpleMessage); 62 }