diff --git a/generator/template.go b/generator/template.go index b7f6a96..6c8070e 100644 --- a/generator/template.go +++ b/generator/template.go @@ -98,10 +98,119 @@ const fetchTmpl = ` * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY */ +/** + * base64 encoder and decoder + * Copied and adapted from https://github.com/protobufjs/protobuf.js/blob/master/lib/base64/index.js + */ +// Base64 encoding table +const b64 = new Array(64); + +// Base64 decoding table +const s64 = new Array(123); + +// 65..90, 97..122, 48..57, 43, 47 +for (let i = 0; i < 64;) + s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; + +export function b64Encode(buffer: Uint8Array, start: number, end: number): string { + let parts: string[] = null; + const chunk = []; + let i = 0, // output index + j = 0, // goto index + t; // temporary + while (start < end) { + const b = buffer[start++]; + switch (j) { + case 0: + chunk[i++] = b64[b >> 2]; + t = (b & 3) << 4; + j = 1; + break; + case 1: + chunk[i++] = b64[t | b >> 4]; + t = (b & 15) << 2; + j = 2; + break; + case 2: + chunk[i++] = b64[t | b >> 6]; + chunk[i++] = b64[b & 63]; + j = 0; + break; + } + if (i > 8191) { + (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); + i = 0; + } + } + if (j) { + chunk[i++] = b64[t]; + chunk[i++] = 61; + if (j === 1) + chunk[i++] = 61; + } + if (parts) { + if (i) + parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + return parts.join(""); + } + return String.fromCharCode.apply(String, chunk.slice(0, i)); +} + +const invalidEncoding = "invalid encoding"; + +export function b64Decode(s: string): Uint8Array { + const buffer = []; + let offset = 0; + let j = 0, // goto index + t; // temporary + for (let i = 0; i < s.length;) { + let c = s.charCodeAt(i++); + if (c === 61 && j > 1) + break; + if ((c = s64[c]) === undefined) + throw Error(invalidEncoding); + switch (j) { + case 0: + t = c; + j = 1; + break; + case 1: + buffer[offset++] = t << 2 | (c & 48) >> 4; + t = c; + j = 2; + break; + case 2: + buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2; + t = c; + j = 3; + break; + case 3: + buffer[offset++] = (t & 3) << 6 | c; + j = 0; + break; + } + } + if (j === 1) + throw Error(invalidEncoding); + return new Uint8Array(buffer); +} + +function b64Test(s: string): boolean { + return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(s); +} + export interface InitReq extends RequestInit { pathPrefix?: string } +export function replacer(key: any, value: any): any { + if(value && value.constructor === Uint8Array) { + return b64Encode(value, 0, value.length); + } + + return value; +} + export function fetchReq(path: string, init?: InitReq): Promise { const {pathPrefix, ...req} = init || {} @@ -399,9 +508,9 @@ func buildInitReq(method data.Method) string { m := `method: "` + httpMethod + `"` fields := []string{m} if method.HTTPRequestBody == nil || *method.HTTPRequestBody == "*" { - fields = append(fields, "body: JSON.stringify(req)") + fields = append(fields, "body: JSON.stringify(req, fm.replacer)") } else if *method.HTTPRequestBody != "" { - fields = append(fields, `body: JSON.stringify(req["`+*method.HTTPRequestBody+`"])`) + fields = append(fields, `body: JSON.stringify(req["`+*method.HTTPRequestBody+`"], fm.replacer)`) } return strings.Join(fields, ", ") diff --git a/go.mod b/go.mod index 3a4f6c5..2961624 100644 --- a/go.mod +++ b/go.mod @@ -18,5 +18,6 @@ require ( golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 // indirect google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 google.golang.org/grpc v1.33.1 + google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 // indirect google.golang.org/protobuf v1.25.0 ) diff --git a/go.sum b/go.sum index 3ab3acf..441b479 100644 --- a/go.sum +++ b/go.sum @@ -114,6 +114,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1 h1:DGeFlSan2f+WEtCERJ4J9GJWk15TxUi8QGagfI87Xyc= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/integration_tests/integration_test.ts b/integration_tests/integration_test.ts index 7547e82..d598032 100644 --- a/integration_tests/integration_test.ts +++ b/integration_tests/integration_test.ts @@ -2,6 +2,7 @@ import { expect } from 'chai'; import camelCase from 'lodash.camelcase'; import { pathOr } from 'ramda'; import { CounterService } from "./service.pb"; +import { b64Decode } from './fetch.pb'; function getFieldName(name: string) { const useCamelCase = pathOr(false, ['__karma__', 'config', 'useProtoNames'], window) === false @@ -36,6 +37,17 @@ describe("test grpc-gateway-ts communication", () => { expect(response).to.deep.equal([2, 3, 4, 5, 6]) }) + it('binary echo', async () => { + const message = "→ ping"; + + const resp:any = await CounterService.EchoBinary({ + data: new TextEncoder().encode(message), + }, { pathPrefix: "http://localhost:8081" }) + + const bytes = b64Decode(resp["data"]) + expect(new TextDecoder().decode(bytes)).to.equal(message) + }) + it('http get check request', async () => { const result = await CounterService.HTTPGet({ [getFieldName('num_to_increase')]: 10 }, { pathPrefix: "http://localhost:8081" }) expect(result.result).to.equal(11) diff --git a/integration_tests/msg.pb.go b/integration_tests/msg.pb.go index 6a23ebd..8f14316 100644 --- a/integration_tests/msg.pb.go +++ b/integration_tests/msg.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 -// protoc v3.15.6 +// protoc v3.15.8 // source: msg.proto package main diff --git a/integration_tests/service.go b/integration_tests/service.go index cffdbe5..2834f3f 100644 --- a/integration_tests/service.go +++ b/integration_tests/service.go @@ -9,7 +9,9 @@ import ( "google.golang.org/protobuf/types/known/emptypb" ) -type RealCounterService struct{} +type RealCounterService struct { + UnimplementedCounterServiceServer +} func (r *RealCounterService) ExternalMessage(ctx context.Context, request *ExternalRequest) (*ExternalResponse, error) { return &ExternalResponse{ @@ -27,6 +29,12 @@ func (r *RealCounterService) FailingIncrement(c context.Context, req *UnaryReque return nil, status.Errorf(codes.Unavailable, "this increment does not work") } +func (r *RealCounterService) EchoBinary(c context.Context, req *BinaryRequest) (*BinaryResponse, error) { + return &BinaryResponse{ + Data: req.Data, + }, nil +} + func (r *RealCounterService) StreamingIncrements(req *StreamingRequest, service CounterService_StreamingIncrementsServer) error { times := 5 counter := req.Counter diff --git a/integration_tests/service.pb.go b/integration_tests/service.pb.go index 276b14e..e7b2429 100644 --- a/integration_tests/service.pb.go +++ b/integration_tests/service.pb.go @@ -125,6 +125,100 @@ func (x *UnaryResponse) GetResult() int32 { return 0 } +type BinaryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *BinaryRequest) Reset() { + *x = BinaryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BinaryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BinaryRequest) ProtoMessage() {} + +func (x *BinaryRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BinaryRequest.ProtoReflect.Descriptor instead. +func (*BinaryRequest) Descriptor() ([]byte, []int) { + return file_service_proto_rawDescGZIP(), []int{2} +} + +func (x *BinaryRequest) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +type BinaryResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *BinaryResponse) Reset() { + *x = BinaryResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BinaryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BinaryResponse) ProtoMessage() {} + +func (x *BinaryResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BinaryResponse.ProtoReflect.Descriptor instead. +func (*BinaryResponse) Descriptor() ([]byte, []int) { + return file_service_proto_rawDescGZIP(), []int{3} +} + +func (x *BinaryResponse) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + type StreamingRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -136,7 +230,7 @@ type StreamingRequest struct { func (x *StreamingRequest) Reset() { *x = StreamingRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_proto_msgTypes[2] + mi := &file_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -149,7 +243,7 @@ func (x *StreamingRequest) String() string { func (*StreamingRequest) ProtoMessage() {} func (x *StreamingRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_proto_msgTypes[2] + mi := &file_service_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -162,7 +256,7 @@ func (x *StreamingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamingRequest.ProtoReflect.Descriptor instead. func (*StreamingRequest) Descriptor() ([]byte, []int) { - return file_service_proto_rawDescGZIP(), []int{2} + return file_service_proto_rawDescGZIP(), []int{4} } func (x *StreamingRequest) GetCounter() int32 { @@ -183,7 +277,7 @@ type StreamingResponse struct { func (x *StreamingResponse) Reset() { *x = StreamingResponse{} if protoimpl.UnsafeEnabled { - mi := &file_service_proto_msgTypes[3] + mi := &file_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -196,7 +290,7 @@ func (x *StreamingResponse) String() string { func (*StreamingResponse) ProtoMessage() {} func (x *StreamingResponse) ProtoReflect() protoreflect.Message { - mi := &file_service_proto_msgTypes[3] + mi := &file_service_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -209,7 +303,7 @@ func (x *StreamingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamingResponse.ProtoReflect.Descriptor instead. func (*StreamingResponse) Descriptor() ([]byte, []int) { - return file_service_proto_rawDescGZIP(), []int{3} + return file_service_proto_rawDescGZIP(), []int{5} } func (x *StreamingResponse) GetResult() int32 { @@ -230,7 +324,7 @@ type HttpGetRequest struct { func (x *HttpGetRequest) Reset() { *x = HttpGetRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_proto_msgTypes[4] + mi := &file_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -243,7 +337,7 @@ func (x *HttpGetRequest) String() string { func (*HttpGetRequest) ProtoMessage() {} func (x *HttpGetRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_proto_msgTypes[4] + mi := &file_service_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -256,7 +350,7 @@ func (x *HttpGetRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use HttpGetRequest.ProtoReflect.Descriptor instead. func (*HttpGetRequest) Descriptor() ([]byte, []int) { - return file_service_proto_rawDescGZIP(), []int{4} + return file_service_proto_rawDescGZIP(), []int{6} } func (x *HttpGetRequest) GetNumToIncrease() int32 { @@ -277,7 +371,7 @@ type HttpGetResponse struct { func (x *HttpGetResponse) Reset() { *x = HttpGetResponse{} if protoimpl.UnsafeEnabled { - mi := &file_service_proto_msgTypes[5] + mi := &file_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -290,7 +384,7 @@ func (x *HttpGetResponse) String() string { func (*HttpGetResponse) ProtoMessage() {} func (x *HttpGetResponse) ProtoReflect() protoreflect.Message { - mi := &file_service_proto_msgTypes[5] + mi := &file_service_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -303,7 +397,7 @@ func (x *HttpGetResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use HttpGetResponse.ProtoReflect.Descriptor instead. func (*HttpGetResponse) Descriptor() ([]byte, []int) { - return file_service_proto_rawDescGZIP(), []int{5} + return file_service_proto_rawDescGZIP(), []int{7} } func (x *HttpGetResponse) GetResult() int32 { @@ -326,7 +420,7 @@ type HttpPostRequest struct { func (x *HttpPostRequest) Reset() { *x = HttpPostRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_proto_msgTypes[6] + mi := &file_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -339,7 +433,7 @@ func (x *HttpPostRequest) String() string { func (*HttpPostRequest) ProtoMessage() {} func (x *HttpPostRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_proto_msgTypes[6] + mi := &file_service_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -352,7 +446,7 @@ func (x *HttpPostRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use HttpPostRequest.ProtoReflect.Descriptor instead. func (*HttpPostRequest) Descriptor() ([]byte, []int) { - return file_service_proto_rawDescGZIP(), []int{6} + return file_service_proto_rawDescGZIP(), []int{8} } func (x *HttpPostRequest) GetA() int32 { @@ -387,7 +481,7 @@ type PostRequest struct { func (x *PostRequest) Reset() { *x = PostRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_proto_msgTypes[7] + mi := &file_service_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -400,7 +494,7 @@ func (x *PostRequest) String() string { func (*PostRequest) ProtoMessage() {} func (x *PostRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_proto_msgTypes[7] + mi := &file_service_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -413,7 +507,7 @@ func (x *PostRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PostRequest.ProtoReflect.Descriptor instead. func (*PostRequest) Descriptor() ([]byte, []int) { - return file_service_proto_rawDescGZIP(), []int{7} + return file_service_proto_rawDescGZIP(), []int{9} } func (x *PostRequest) GetB() int32 { @@ -434,7 +528,7 @@ type HttpPostResponse struct { func (x *HttpPostResponse) Reset() { *x = HttpPostResponse{} if protoimpl.UnsafeEnabled { - mi := &file_service_proto_msgTypes[8] + mi := &file_service_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -447,7 +541,7 @@ func (x *HttpPostResponse) String() string { func (*HttpPostResponse) ProtoMessage() {} func (x *HttpPostResponse) ProtoReflect() protoreflect.Message { - mi := &file_service_proto_msgTypes[8] + mi := &file_service_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -460,7 +554,7 @@ func (x *HttpPostResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use HttpPostResponse.ProtoReflect.Descriptor instead. func (*HttpPostResponse) Descriptor() ([]byte, []int) { - return file_service_proto_rawDescGZIP(), []int{8} + return file_service_proto_rawDescGZIP(), []int{10} } func (x *HttpPostResponse) GetPostResult() int32 { @@ -482,7 +576,7 @@ type HttpPatchRequest struct { func (x *HttpPatchRequest) Reset() { *x = HttpPatchRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_proto_msgTypes[9] + mi := &file_service_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -495,7 +589,7 @@ func (x *HttpPatchRequest) String() string { func (*HttpPatchRequest) ProtoMessage() {} func (x *HttpPatchRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_proto_msgTypes[9] + mi := &file_service_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -508,7 +602,7 @@ func (x *HttpPatchRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use HttpPatchRequest.ProtoReflect.Descriptor instead. func (*HttpPatchRequest) Descriptor() ([]byte, []int) { - return file_service_proto_rawDescGZIP(), []int{9} + return file_service_proto_rawDescGZIP(), []int{11} } func (x *HttpPatchRequest) GetA() int32 { @@ -536,7 +630,7 @@ type HttpPatchResponse struct { func (x *HttpPatchResponse) Reset() { *x = HttpPatchResponse{} if protoimpl.UnsafeEnabled { - mi := &file_service_proto_msgTypes[10] + mi := &file_service_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -549,7 +643,7 @@ func (x *HttpPatchResponse) String() string { func (*HttpPatchResponse) ProtoMessage() {} func (x *HttpPatchResponse) ProtoReflect() protoreflect.Message { - mi := &file_service_proto_msgTypes[10] + mi := &file_service_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -562,7 +656,7 @@ func (x *HttpPatchResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use HttpPatchResponse.ProtoReflect.Descriptor instead. func (*HttpPatchResponse) Descriptor() ([]byte, []int) { - return file_service_proto_rawDescGZIP(), []int{10} + return file_service_proto_rawDescGZIP(), []int{12} } func (x *HttpPatchResponse) GetPatchResult() int32 { @@ -583,7 +677,7 @@ type HttpDeleteRequest struct { func (x *HttpDeleteRequest) Reset() { *x = HttpDeleteRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_proto_msgTypes[11] + mi := &file_service_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -596,7 +690,7 @@ func (x *HttpDeleteRequest) String() string { func (*HttpDeleteRequest) ProtoMessage() {} func (x *HttpDeleteRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_proto_msgTypes[11] + mi := &file_service_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -609,7 +703,7 @@ func (x *HttpDeleteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use HttpDeleteRequest.ProtoReflect.Descriptor instead. func (*HttpDeleteRequest) Descriptor() ([]byte, []int) { - return file_service_proto_rawDescGZIP(), []int{11} + return file_service_proto_rawDescGZIP(), []int{13} } func (x *HttpDeleteRequest) GetA() int32 { @@ -633,7 +727,7 @@ type HTTPGetWithURLSearchParamsRequest struct { func (x *HTTPGetWithURLSearchParamsRequest) Reset() { *x = HTTPGetWithURLSearchParamsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_proto_msgTypes[12] + mi := &file_service_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -646,7 +740,7 @@ func (x *HTTPGetWithURLSearchParamsRequest) String() string { func (*HTTPGetWithURLSearchParamsRequest) ProtoMessage() {} func (x *HTTPGetWithURLSearchParamsRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_proto_msgTypes[12] + mi := &file_service_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -659,7 +753,7 @@ func (x *HTTPGetWithURLSearchParamsRequest) ProtoReflect() protoreflect.Message // Deprecated: Use HTTPGetWithURLSearchParamsRequest.ProtoReflect.Descriptor instead. func (*HTTPGetWithURLSearchParamsRequest) Descriptor() ([]byte, []int) { - return file_service_proto_rawDescGZIP(), []int{12} + return file_service_proto_rawDescGZIP(), []int{14} } func (x *HTTPGetWithURLSearchParamsRequest) GetA() int32 { @@ -701,7 +795,7 @@ type HTTPGetWithURLSearchParamsResponse struct { func (x *HTTPGetWithURLSearchParamsResponse) Reset() { *x = HTTPGetWithURLSearchParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_service_proto_msgTypes[13] + mi := &file_service_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -714,7 +808,7 @@ func (x *HTTPGetWithURLSearchParamsResponse) String() string { func (*HTTPGetWithURLSearchParamsResponse) ProtoMessage() {} func (x *HTTPGetWithURLSearchParamsResponse) ProtoReflect() protoreflect.Message { - mi := &file_service_proto_msgTypes[13] + mi := &file_service_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -727,7 +821,7 @@ func (x *HTTPGetWithURLSearchParamsResponse) ProtoReflect() protoreflect.Message // Deprecated: Use HTTPGetWithURLSearchParamsResponse.ProtoReflect.Descriptor instead. func (*HTTPGetWithURLSearchParamsResponse) Descriptor() ([]byte, []int) { - return file_service_proto_rawDescGZIP(), []int{13} + return file_service_proto_rawDescGZIP(), []int{15} } func (x *HTTPGetWithURLSearchParamsResponse) GetUrlSearchParamsResult() int32 { @@ -750,7 +844,7 @@ type ZeroValueMsg struct { func (x *ZeroValueMsg) Reset() { *x = ZeroValueMsg{} if protoimpl.UnsafeEnabled { - mi := &file_service_proto_msgTypes[14] + mi := &file_service_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -763,7 +857,7 @@ func (x *ZeroValueMsg) String() string { func (*ZeroValueMsg) ProtoMessage() {} func (x *ZeroValueMsg) ProtoReflect() protoreflect.Message { - mi := &file_service_proto_msgTypes[14] + mi := &file_service_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -776,7 +870,7 @@ func (x *ZeroValueMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use ZeroValueMsg.ProtoReflect.Descriptor instead. func (*ZeroValueMsg) Descriptor() ([]byte, []int) { - return file_service_proto_rawDescGZIP(), []int{14} + return file_service_proto_rawDescGZIP(), []int{16} } func (x *ZeroValueMsg) GetC() int32 { @@ -813,7 +907,7 @@ type HTTPGetWithZeroValueURLSearchParamsRequest struct { func (x *HTTPGetWithZeroValueURLSearchParamsRequest) Reset() { *x = HTTPGetWithZeroValueURLSearchParamsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_proto_msgTypes[15] + mi := &file_service_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -826,7 +920,7 @@ func (x *HTTPGetWithZeroValueURLSearchParamsRequest) String() string { func (*HTTPGetWithZeroValueURLSearchParamsRequest) ProtoMessage() {} func (x *HTTPGetWithZeroValueURLSearchParamsRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_proto_msgTypes[15] + mi := &file_service_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -839,7 +933,7 @@ func (x *HTTPGetWithZeroValueURLSearchParamsRequest) ProtoReflect() protoreflect // Deprecated: Use HTTPGetWithZeroValueURLSearchParamsRequest.ProtoReflect.Descriptor instead. func (*HTTPGetWithZeroValueURLSearchParamsRequest) Descriptor() ([]byte, []int) { - return file_service_proto_rawDescGZIP(), []int{15} + return file_service_proto_rawDescGZIP(), []int{17} } func (x *HTTPGetWithZeroValueURLSearchParamsRequest) GetA() string { @@ -876,7 +970,7 @@ type HTTPGetWithZeroValueURLSearchParamsResponse struct { func (x *HTTPGetWithZeroValueURLSearchParamsResponse) Reset() { *x = HTTPGetWithZeroValueURLSearchParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_service_proto_msgTypes[16] + mi := &file_service_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -889,7 +983,7 @@ func (x *HTTPGetWithZeroValueURLSearchParamsResponse) String() string { func (*HTTPGetWithZeroValueURLSearchParamsResponse) ProtoMessage() {} func (x *HTTPGetWithZeroValueURLSearchParamsResponse) ProtoReflect() protoreflect.Message { - mi := &file_service_proto_msgTypes[16] + mi := &file_service_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -902,7 +996,7 @@ func (x *HTTPGetWithZeroValueURLSearchParamsResponse) ProtoReflect() protoreflec // Deprecated: Use HTTPGetWithZeroValueURLSearchParamsResponse.ProtoReflect.Descriptor instead. func (*HTTPGetWithZeroValueURLSearchParamsResponse) Descriptor() ([]byte, []int) { - return file_service_proto_rawDescGZIP(), []int{16} + return file_service_proto_rawDescGZIP(), []int{18} } func (x *HTTPGetWithZeroValueURLSearchParamsResponse) GetA() string { @@ -939,139 +1033,147 @@ var file_service_proto_rawDesc = []byte{ 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x22, 0x27, 0x0a, 0x0d, 0x55, 0x6e, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x2c, - 0x0a, 0x10, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x22, 0x2b, 0x0a, 0x11, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x23, + 0x0a, 0x0d, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x22, 0x24, 0x0a, 0x0e, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2c, 0x0a, 0x10, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x22, 0x2b, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x22, 0x38, 0x0a, 0x0e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x6f, + 0x5f, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0d, 0x6e, 0x75, 0x6d, 0x54, 0x6f, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x22, 0x29, + 0x0a, 0x0f, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x38, 0x0a, 0x0e, 0x48, 0x74, 0x74, - 0x70, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x6e, - 0x75, 0x6d, 0x5f, 0x74, 0x6f, 0x5f, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6e, 0x75, 0x6d, 0x54, 0x6f, 0x49, 0x6e, 0x63, 0x72, 0x65, - 0x61, 0x73, 0x65, 0x22, 0x29, 0x0a, 0x0f, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x52, - 0x0a, 0x0f, 0x48, 0x74, 0x74, 0x70, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x0c, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x61, 0x12, - 0x23, 0x0a, 0x03, 0x72, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, - 0x61, 0x69, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, - 0x03, 0x72, 0x65, 0x71, 0x12, 0x0c, 0x0a, 0x01, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x01, 0x63, 0x22, 0x1b, 0x0a, 0x0b, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x0c, 0x0a, 0x01, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x62, 0x22, - 0x33, 0x0a, 0x10, 0x48, 0x74, 0x74, 0x70, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x22, 0x2e, 0x0a, 0x10, 0x48, 0x74, 0x74, 0x70, 0x50, 0x61, 0x74, 0x63, - 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0c, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x01, 0x61, 0x12, 0x0c, 0x0a, 0x01, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x01, 0x63, 0x22, 0x36, 0x0a, 0x11, 0x48, 0x74, 0x74, 0x70, 0x50, 0x61, 0x74, 0x63, - 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x74, - 0x63, 0x68, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0b, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x21, 0x0a, 0x11, - 0x48, 0x74, 0x74, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x0c, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x61, 0x22, - 0x98, 0x01, 0x0a, 0x21, 0x48, 0x54, 0x54, 0x50, 0x47, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x55, - 0x52, 0x4c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0c, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x01, 0x61, 0x12, 0x2c, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x50, 0x6f, 0x73, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x70, 0x6f, 0x73, 0x74, 0x52, 0x65, - 0x71, 0x12, 0x0c, 0x0a, 0x01, 0x63, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x01, 0x63, 0x12, - 0x29, 0x0a, 0x07, 0x65, 0x78, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x52, 0x06, 0x65, 0x78, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x5d, 0x0a, 0x22, 0x48, 0x54, - 0x54, 0x50, 0x47, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x55, 0x52, 0x4c, 0x53, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x37, 0x0a, 0x18, 0x75, 0x72, 0x6c, 0x5f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x15, 0x75, 0x72, 0x6c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x38, 0x0a, 0x0c, 0x5a, 0x65, 0x72, - 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x0c, 0x0a, 0x01, 0x63, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x63, 0x12, 0x0c, 0x0a, 0x01, 0x64, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x05, 0x52, 0x01, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x01, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x2a, 0x48, 0x54, 0x54, 0x50, 0x47, 0x65, 0x74, 0x57, + 0x05, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x52, 0x0a, 0x0f, 0x48, 0x74, 0x74, + 0x70, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0c, 0x0a, 0x01, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x61, 0x12, 0x23, 0x0a, 0x03, 0x72, 0x65, + 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x50, + 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x03, 0x72, 0x65, 0x71, 0x12, + 0x0c, 0x0a, 0x01, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x63, 0x22, 0x1b, 0x0a, + 0x0b, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0c, 0x0a, 0x01, + 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x62, 0x22, 0x33, 0x0a, 0x10, 0x48, 0x74, + 0x74, 0x70, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, + 0x2e, 0x0a, 0x10, 0x48, 0x74, 0x74, 0x70, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x0c, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, + 0x61, 0x12, 0x0c, 0x0a, 0x01, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x63, 0x22, + 0x36, 0x0a, 0x11, 0x48, 0x74, 0x74, 0x70, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x61, 0x74, 0x63, + 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x21, 0x0a, 0x11, 0x48, 0x74, 0x74, 0x70, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0c, 0x0a, 0x01, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x61, 0x22, 0x98, 0x01, 0x0a, 0x21, 0x48, + 0x54, 0x54, 0x50, 0x47, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x55, 0x52, 0x4c, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x0c, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x61, 0x12, 0x2c, + 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x52, 0x07, 0x70, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x0c, 0x0a, 0x01, + 0x63, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x01, 0x63, 0x12, 0x29, 0x0a, 0x07, 0x65, 0x78, + 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x45, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x06, 0x65, + 0x78, 0x74, 0x4d, 0x73, 0x67, 0x22, 0x5d, 0x0a, 0x22, 0x48, 0x54, 0x54, 0x50, 0x47, 0x65, 0x74, + 0x57, 0x69, 0x74, 0x68, 0x55, 0x52, 0x4c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x75, + 0x72, 0x6c, 0x5f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, 0x75, + 0x72, 0x6c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x22, 0x38, 0x0a, 0x0c, 0x5a, 0x65, 0x72, 0x6f, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x4d, 0x73, 0x67, 0x12, 0x0c, 0x0a, 0x01, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x01, 0x63, 0x12, 0x0c, 0x0a, 0x01, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x01, 0x64, + 0x12, 0x0c, 0x0a, 0x01, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x01, 0x65, 0x22, 0x82, + 0x01, 0x0a, 0x2a, 0x48, 0x54, 0x54, 0x50, 0x47, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x5a, 0x65, + 0x72, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x55, 0x52, 0x4c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0c, 0x0a, + 0x01, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x61, 0x12, 0x0c, 0x0a, 0x01, 0x62, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x62, 0x12, 0x38, 0x0a, 0x0e, 0x7a, 0x65, 0x72, + 0x6f, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x5a, 0x65, 0x72, 0x6f, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x0c, 0x7a, 0x65, 0x72, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x4d, 0x73, 0x67, 0x22, 0x83, 0x01, 0x0a, 0x2b, 0x48, 0x54, 0x54, 0x50, 0x47, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x5a, 0x65, 0x72, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x55, 0x52, 0x4c, 0x53, - 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x0c, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x61, - 0x12, 0x0c, 0x0a, 0x01, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x62, 0x12, 0x38, - 0x0a, 0x0e, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6d, 0x73, 0x67, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x5a, 0x65, - 0x72, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x0c, 0x7a, 0x65, 0x72, 0x6f, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x73, 0x67, 0x22, 0x83, 0x01, 0x0a, 0x2b, 0x48, 0x54, 0x54, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, + 0x61, 0x12, 0x0c, 0x0a, 0x01, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x62, 0x12, + 0x38, 0x0a, 0x0e, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6d, 0x73, + 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x5a, + 0x65, 0x72, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x0c, 0x7a, 0x65, 0x72, + 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x73, 0x67, 0x32, 0xb1, 0x08, 0x0a, 0x0e, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x09, + 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x2e, 0x6d, 0x61, 0x69, 0x6e, + 0x2e, 0x55, 0x6e, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, + 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x55, 0x6e, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x48, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x49, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x6d, 0x61, 0x69, 0x6e, + 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x17, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x3b, 0x0a, 0x10, + 0x46, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x12, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x55, 0x6e, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x55, 0x6e, 0x61, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x45, 0x63, 0x68, + 0x6f, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x13, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x42, + 0x69, 0x6e, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x6d, + 0x61, 0x69, 0x6e, 0x2e, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x56, 0x0a, 0x07, 0x48, 0x54, 0x54, 0x50, 0x47, 0x65, 0x74, 0x12, 0x14, 0x2e, + 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x7b, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x6f, + 0x5f, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x7d, 0x12, 0x63, 0x0a, 0x1a, 0x48, 0x54, + 0x54, 0x50, 0x50, 0x6f, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, + 0x42, 0x6f, 0x64, 0x79, 0x50, 0x61, 0x74, 0x68, 0x12, 0x15, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, + 0x48, 0x74, 0x74, 0x70, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x6f, 0x73, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x22, + 0x09, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x7b, 0x61, 0x7d, 0x3a, 0x03, 0x72, 0x65, 0x71, 0x12, + 0x63, 0x0a, 0x18, 0x48, 0x54, 0x54, 0x50, 0x50, 0x6f, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x53, + 0x74, 0x61, 0x72, 0x42, 0x6f, 0x64, 0x79, 0x50, 0x61, 0x74, 0x68, 0x12, 0x15, 0x2e, 0x6d, 0x61, + 0x69, 0x6e, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x6f, + 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x12, 0x22, 0x0d, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x7b, 0x61, 0x7d, 0x2f, 0x7b, 0x63, + 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0x4f, 0x0a, 0x09, 0x48, 0x54, 0x54, 0x50, 0x50, 0x61, 0x74, 0x63, + 0x68, 0x12, 0x16, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x61, 0x74, + 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6d, 0x61, 0x69, 0x6e, + 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x32, 0x06, 0x2f, 0x70, 0x61, 0x74, + 0x63, 0x68, 0x3a, 0x01, 0x2a, 0x12, 0x52, 0x0a, 0x0a, 0x48, 0x54, 0x54, 0x50, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x12, 0x17, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x2a, 0x0b, 0x2f, 0x64, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x2f, 0x7b, 0x61, 0x7d, 0x12, 0x36, 0x0a, 0x0f, 0x45, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, 0x2e, 0x45, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, + 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x87, 0x01, 0x0a, 0x1a, 0x48, 0x54, 0x54, 0x50, 0x47, 0x65, 0x74, 0x57, 0x69, 0x74, + 0x68, 0x55, 0x52, 0x4c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x27, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x47, 0x65, 0x74, 0x57, + 0x69, 0x74, 0x68, 0x55, 0x52, 0x4c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x61, 0x69, 0x6e, + 0x2e, 0x48, 0x54, 0x54, 0x50, 0x47, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x55, 0x52, 0x4c, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x7b, 0x61, 0x7d, 0x12, 0x9f, 0x01, 0x0a, 0x23, + 0x48, 0x54, 0x54, 0x50, 0x47, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x5a, 0x65, 0x72, 0x6f, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x55, 0x52, 0x4c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x30, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x47, + 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x5a, 0x65, 0x72, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x55, + 0x52, 0x4c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x47, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x5a, 0x65, 0x72, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x55, 0x52, 0x4c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x01, 0x61, 0x12, 0x0c, 0x0a, 0x01, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x01, 0x62, 0x12, 0x38, 0x0a, 0x0e, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, - 0x61, 0x69, 0x6e, 0x2e, 0x5a, 0x65, 0x72, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x73, 0x67, - 0x52, 0x0c, 0x7a, 0x65, 0x72, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x73, 0x67, 0x32, 0xf8, - 0x07, 0x0a, 0x0e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x34, 0x0a, 0x09, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, - 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x55, 0x6e, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x55, 0x6e, 0x61, 0x72, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x16, - 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, - 0x01, 0x12, 0x3b, 0x0a, 0x10, 0x46, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x55, 0x6e, 0x61, - 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6d, 0x61, 0x69, 0x6e, - 0x2e, 0x55, 0x6e, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, - 0x0a, 0x07, 0x48, 0x54, 0x54, 0x50, 0x47, 0x65, 0x74, 0x12, 0x14, 0x2e, 0x6d, 0x61, 0x69, 0x6e, - 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x15, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x7b, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x6f, 0x5f, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x61, 0x73, 0x65, 0x7d, 0x12, 0x63, 0x0a, 0x1a, 0x48, 0x54, 0x54, 0x50, 0x50, 0x6f, - 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x42, 0x6f, 0x64, 0x79, - 0x50, 0x61, 0x74, 0x68, 0x12, 0x15, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x48, 0x74, 0x74, 0x70, - 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6d, 0x61, - 0x69, 0x6e, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x22, 0x09, 0x2f, 0x70, 0x6f, - 0x73, 0x74, 0x2f, 0x7b, 0x61, 0x7d, 0x3a, 0x03, 0x72, 0x65, 0x71, 0x12, 0x63, 0x0a, 0x18, 0x48, - 0x54, 0x54, 0x50, 0x50, 0x6f, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x53, 0x74, 0x61, 0x72, 0x42, - 0x6f, 0x64, 0x79, 0x50, 0x61, 0x74, 0x68, 0x12, 0x15, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x48, - 0x74, 0x74, 0x70, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x0d, - 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x7b, 0x61, 0x7d, 0x2f, 0x7b, 0x63, 0x7d, 0x3a, 0x01, 0x2a, - 0x12, 0x4f, 0x0a, 0x09, 0x48, 0x54, 0x54, 0x50, 0x50, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x2e, - 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x48, 0x74, 0x74, - 0x70, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x32, 0x06, 0x2f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x01, - 0x2a, 0x12, 0x52, 0x0a, 0x0a, 0x48, 0x54, 0x54, 0x50, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, - 0x17, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x2a, 0x0b, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x2f, 0x7b, 0x61, 0x7d, 0x12, 0x36, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x45, 0x78, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x87, 0x01, - 0x0a, 0x1a, 0x48, 0x54, 0x54, 0x50, 0x47, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x55, 0x52, 0x4c, - 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x6d, - 0x61, 0x69, 0x6e, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x47, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x55, - 0x52, 0x4c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x48, 0x54, 0x54, - 0x50, 0x47, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x55, 0x52, 0x4c, 0x53, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2f, 0x7b, 0x61, 0x7d, 0x12, 0x9f, 0x01, 0x0a, 0x23, 0x48, 0x54, 0x54, 0x50, - 0x47, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x5a, 0x65, 0x72, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x55, 0x52, 0x4c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x30, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x47, 0x65, 0x74, 0x57, 0x69, - 0x74, 0x68, 0x5a, 0x65, 0x72, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x55, 0x52, 0x4c, 0x53, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x31, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x47, 0x65, 0x74, - 0x57, 0x69, 0x74, 0x68, 0x5a, 0x65, 0x72, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x55, 0x52, 0x4c, - 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x70, - 0x61, 0x74, 0x68, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x2f, 0x3b, - 0x6d, 0x61, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, + 0x12, 0x0b, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x42, 0x09, 0x5a, + 0x07, 0x2e, 0x2f, 0x3b, 0x6d, 0x61, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1086,60 +1188,64 @@ func file_service_proto_rawDescGZIP() []byte { return file_service_proto_rawDescData } -var file_service_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_service_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_service_proto_goTypes = []interface{}{ (*UnaryRequest)(nil), // 0: main.UnaryRequest (*UnaryResponse)(nil), // 1: main.UnaryResponse - (*StreamingRequest)(nil), // 2: main.StreamingRequest - (*StreamingResponse)(nil), // 3: main.StreamingResponse - (*HttpGetRequest)(nil), // 4: main.HttpGetRequest - (*HttpGetResponse)(nil), // 5: main.HttpGetResponse - (*HttpPostRequest)(nil), // 6: main.HttpPostRequest - (*PostRequest)(nil), // 7: main.PostRequest - (*HttpPostResponse)(nil), // 8: main.HttpPostResponse - (*HttpPatchRequest)(nil), // 9: main.HttpPatchRequest - (*HttpPatchResponse)(nil), // 10: main.HttpPatchResponse - (*HttpDeleteRequest)(nil), // 11: main.HttpDeleteRequest - (*HTTPGetWithURLSearchParamsRequest)(nil), // 12: main.HTTPGetWithURLSearchParamsRequest - (*HTTPGetWithURLSearchParamsResponse)(nil), // 13: main.HTTPGetWithURLSearchParamsResponse - (*ZeroValueMsg)(nil), // 14: main.ZeroValueMsg - (*HTTPGetWithZeroValueURLSearchParamsRequest)(nil), // 15: main.HTTPGetWithZeroValueURLSearchParamsRequest - (*HTTPGetWithZeroValueURLSearchParamsResponse)(nil), // 16: main.HTTPGetWithZeroValueURLSearchParamsResponse - (*ExternalMessage)(nil), // 17: ExternalMessage - (*ExternalRequest)(nil), // 18: ExternalRequest - (*emptypb.Empty)(nil), // 19: google.protobuf.Empty - (*ExternalResponse)(nil), // 20: ExternalResponse + (*BinaryRequest)(nil), // 2: main.BinaryRequest + (*BinaryResponse)(nil), // 3: main.BinaryResponse + (*StreamingRequest)(nil), // 4: main.StreamingRequest + (*StreamingResponse)(nil), // 5: main.StreamingResponse + (*HttpGetRequest)(nil), // 6: main.HttpGetRequest + (*HttpGetResponse)(nil), // 7: main.HttpGetResponse + (*HttpPostRequest)(nil), // 8: main.HttpPostRequest + (*PostRequest)(nil), // 9: main.PostRequest + (*HttpPostResponse)(nil), // 10: main.HttpPostResponse + (*HttpPatchRequest)(nil), // 11: main.HttpPatchRequest + (*HttpPatchResponse)(nil), // 12: main.HttpPatchResponse + (*HttpDeleteRequest)(nil), // 13: main.HttpDeleteRequest + (*HTTPGetWithURLSearchParamsRequest)(nil), // 14: main.HTTPGetWithURLSearchParamsRequest + (*HTTPGetWithURLSearchParamsResponse)(nil), // 15: main.HTTPGetWithURLSearchParamsResponse + (*ZeroValueMsg)(nil), // 16: main.ZeroValueMsg + (*HTTPGetWithZeroValueURLSearchParamsRequest)(nil), // 17: main.HTTPGetWithZeroValueURLSearchParamsRequest + (*HTTPGetWithZeroValueURLSearchParamsResponse)(nil), // 18: main.HTTPGetWithZeroValueURLSearchParamsResponse + (*ExternalMessage)(nil), // 19: ExternalMessage + (*ExternalRequest)(nil), // 20: ExternalRequest + (*emptypb.Empty)(nil), // 21: google.protobuf.Empty + (*ExternalResponse)(nil), // 22: ExternalResponse } var file_service_proto_depIdxs = []int32{ - 7, // 0: main.HttpPostRequest.req:type_name -> main.PostRequest - 7, // 1: main.HTTPGetWithURLSearchParamsRequest.post_req:type_name -> main.PostRequest - 17, // 2: main.HTTPGetWithURLSearchParamsRequest.ext_msg:type_name -> ExternalMessage - 14, // 3: main.HTTPGetWithZeroValueURLSearchParamsRequest.zero_value_msg:type_name -> main.ZeroValueMsg - 14, // 4: main.HTTPGetWithZeroValueURLSearchParamsResponse.zero_value_msg:type_name -> main.ZeroValueMsg + 9, // 0: main.HttpPostRequest.req:type_name -> main.PostRequest + 9, // 1: main.HTTPGetWithURLSearchParamsRequest.post_req:type_name -> main.PostRequest + 19, // 2: main.HTTPGetWithURLSearchParamsRequest.ext_msg:type_name -> ExternalMessage + 16, // 3: main.HTTPGetWithZeroValueURLSearchParamsRequest.zero_value_msg:type_name -> main.ZeroValueMsg + 16, // 4: main.HTTPGetWithZeroValueURLSearchParamsResponse.zero_value_msg:type_name -> main.ZeroValueMsg 0, // 5: main.CounterService.Increment:input_type -> main.UnaryRequest - 2, // 6: main.CounterService.StreamingIncrements:input_type -> main.StreamingRequest + 4, // 6: main.CounterService.StreamingIncrements:input_type -> main.StreamingRequest 0, // 7: main.CounterService.FailingIncrement:input_type -> main.UnaryRequest - 4, // 8: main.CounterService.HTTPGet:input_type -> main.HttpGetRequest - 6, // 9: main.CounterService.HTTPPostWithNestedBodyPath:input_type -> main.HttpPostRequest - 6, // 10: main.CounterService.HTTPPostWithStarBodyPath:input_type -> main.HttpPostRequest - 9, // 11: main.CounterService.HTTPPatch:input_type -> main.HttpPatchRequest - 11, // 12: main.CounterService.HTTPDelete:input_type -> main.HttpDeleteRequest - 18, // 13: main.CounterService.ExternalMessage:input_type -> ExternalRequest - 12, // 14: main.CounterService.HTTPGetWithURLSearchParams:input_type -> main.HTTPGetWithURLSearchParamsRequest - 15, // 15: main.CounterService.HTTPGetWithZeroValueURLSearchParams:input_type -> main.HTTPGetWithZeroValueURLSearchParamsRequest - 1, // 16: main.CounterService.Increment:output_type -> main.UnaryResponse - 3, // 17: main.CounterService.StreamingIncrements:output_type -> main.StreamingResponse - 1, // 18: main.CounterService.FailingIncrement:output_type -> main.UnaryResponse - 5, // 19: main.CounterService.HTTPGet:output_type -> main.HttpGetResponse - 8, // 20: main.CounterService.HTTPPostWithNestedBodyPath:output_type -> main.HttpPostResponse - 8, // 21: main.CounterService.HTTPPostWithStarBodyPath:output_type -> main.HttpPostResponse - 10, // 22: main.CounterService.HTTPPatch:output_type -> main.HttpPatchResponse - 19, // 23: main.CounterService.HTTPDelete:output_type -> google.protobuf.Empty - 20, // 24: main.CounterService.ExternalMessage:output_type -> ExternalResponse - 13, // 25: main.CounterService.HTTPGetWithURLSearchParams:output_type -> main.HTTPGetWithURLSearchParamsResponse - 16, // 26: main.CounterService.HTTPGetWithZeroValueURLSearchParams:output_type -> main.HTTPGetWithZeroValueURLSearchParamsResponse - 16, // [16:27] is the sub-list for method output_type - 5, // [5:16] is the sub-list for method input_type + 2, // 8: main.CounterService.EchoBinary:input_type -> main.BinaryRequest + 6, // 9: main.CounterService.HTTPGet:input_type -> main.HttpGetRequest + 8, // 10: main.CounterService.HTTPPostWithNestedBodyPath:input_type -> main.HttpPostRequest + 8, // 11: main.CounterService.HTTPPostWithStarBodyPath:input_type -> main.HttpPostRequest + 11, // 12: main.CounterService.HTTPPatch:input_type -> main.HttpPatchRequest + 13, // 13: main.CounterService.HTTPDelete:input_type -> main.HttpDeleteRequest + 20, // 14: main.CounterService.ExternalMessage:input_type -> ExternalRequest + 14, // 15: main.CounterService.HTTPGetWithURLSearchParams:input_type -> main.HTTPGetWithURLSearchParamsRequest + 17, // 16: main.CounterService.HTTPGetWithZeroValueURLSearchParams:input_type -> main.HTTPGetWithZeroValueURLSearchParamsRequest + 1, // 17: main.CounterService.Increment:output_type -> main.UnaryResponse + 5, // 18: main.CounterService.StreamingIncrements:output_type -> main.StreamingResponse + 1, // 19: main.CounterService.FailingIncrement:output_type -> main.UnaryResponse + 3, // 20: main.CounterService.EchoBinary:output_type -> main.BinaryResponse + 7, // 21: main.CounterService.HTTPGet:output_type -> main.HttpGetResponse + 10, // 22: main.CounterService.HTTPPostWithNestedBodyPath:output_type -> main.HttpPostResponse + 10, // 23: main.CounterService.HTTPPostWithStarBodyPath:output_type -> main.HttpPostResponse + 12, // 24: main.CounterService.HTTPPatch:output_type -> main.HttpPatchResponse + 21, // 25: main.CounterService.HTTPDelete:output_type -> google.protobuf.Empty + 22, // 26: main.CounterService.ExternalMessage:output_type -> ExternalResponse + 15, // 27: main.CounterService.HTTPGetWithURLSearchParams:output_type -> main.HTTPGetWithURLSearchParamsResponse + 18, // 28: main.CounterService.HTTPGetWithZeroValueURLSearchParams:output_type -> main.HTTPGetWithZeroValueURLSearchParamsResponse + 17, // [17:29] is the sub-list for method output_type + 5, // [5:17] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name 5, // [5:5] is the sub-list for extension extendee 0, // [0:5] is the sub-list for field type_name @@ -1177,7 +1283,7 @@ func file_service_proto_init() { } } file_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamingRequest); i { + switch v := v.(*BinaryRequest); i { case 0: return &v.state case 1: @@ -1189,7 +1295,7 @@ func file_service_proto_init() { } } file_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamingResponse); i { + switch v := v.(*BinaryResponse); i { case 0: return &v.state case 1: @@ -1201,7 +1307,7 @@ func file_service_proto_init() { } } file_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpGetRequest); i { + switch v := v.(*StreamingRequest); i { case 0: return &v.state case 1: @@ -1213,7 +1319,7 @@ func file_service_proto_init() { } } file_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpGetResponse); i { + switch v := v.(*StreamingResponse); i { case 0: return &v.state case 1: @@ -1225,7 +1331,7 @@ func file_service_proto_init() { } } file_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpPostRequest); i { + switch v := v.(*HttpGetRequest); i { case 0: return &v.state case 1: @@ -1237,7 +1343,7 @@ func file_service_proto_init() { } } file_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PostRequest); i { + switch v := v.(*HttpGetResponse); i { case 0: return &v.state case 1: @@ -1249,7 +1355,7 @@ func file_service_proto_init() { } } file_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpPostResponse); i { + switch v := v.(*HttpPostRequest); i { case 0: return &v.state case 1: @@ -1261,7 +1367,7 @@ func file_service_proto_init() { } } file_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpPatchRequest); i { + switch v := v.(*PostRequest); i { case 0: return &v.state case 1: @@ -1273,7 +1379,7 @@ func file_service_proto_init() { } } file_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpPatchResponse); i { + switch v := v.(*HttpPostResponse); i { case 0: return &v.state case 1: @@ -1285,7 +1391,7 @@ func file_service_proto_init() { } } file_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpDeleteRequest); i { + switch v := v.(*HttpPatchRequest); i { case 0: return &v.state case 1: @@ -1297,7 +1403,7 @@ func file_service_proto_init() { } } file_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPGetWithURLSearchParamsRequest); i { + switch v := v.(*HttpPatchResponse); i { case 0: return &v.state case 1: @@ -1309,7 +1415,7 @@ func file_service_proto_init() { } } file_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPGetWithURLSearchParamsResponse); i { + switch v := v.(*HttpDeleteRequest); i { case 0: return &v.state case 1: @@ -1321,7 +1427,7 @@ func file_service_proto_init() { } } file_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ZeroValueMsg); i { + switch v := v.(*HTTPGetWithURLSearchParamsRequest); i { case 0: return &v.state case 1: @@ -1333,7 +1439,7 @@ func file_service_proto_init() { } } file_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPGetWithZeroValueURLSearchParamsRequest); i { + switch v := v.(*HTTPGetWithURLSearchParamsResponse); i { case 0: return &v.state case 1: @@ -1345,6 +1451,30 @@ func file_service_proto_init() { } } file_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ZeroValueMsg); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HTTPGetWithZeroValueURLSearchParamsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HTTPGetWithZeroValueURLSearchParamsResponse); i { case 0: return &v.state @@ -1363,7 +1493,7 @@ func file_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_service_proto_rawDesc, NumEnums: 0, - NumMessages: 17, + NumMessages: 19, NumExtensions: 0, NumServices: 1, }, @@ -1392,6 +1522,7 @@ type CounterServiceClient interface { Increment(ctx context.Context, in *UnaryRequest, opts ...grpc.CallOption) (*UnaryResponse, error) StreamingIncrements(ctx context.Context, in *StreamingRequest, opts ...grpc.CallOption) (CounterService_StreamingIncrementsClient, error) FailingIncrement(ctx context.Context, in *UnaryRequest, opts ...grpc.CallOption) (*UnaryResponse, error) + EchoBinary(ctx context.Context, in *BinaryRequest, opts ...grpc.CallOption) (*BinaryResponse, error) HTTPGet(ctx context.Context, in *HttpGetRequest, opts ...grpc.CallOption) (*HttpGetResponse, error) HTTPPostWithNestedBodyPath(ctx context.Context, in *HttpPostRequest, opts ...grpc.CallOption) (*HttpPostResponse, error) HTTPPostWithStarBodyPath(ctx context.Context, in *HttpPostRequest, opts ...grpc.CallOption) (*HttpPostResponse, error) @@ -1460,6 +1591,15 @@ func (c *counterServiceClient) FailingIncrement(ctx context.Context, in *UnaryRe return out, nil } +func (c *counterServiceClient) EchoBinary(ctx context.Context, in *BinaryRequest, opts ...grpc.CallOption) (*BinaryResponse, error) { + out := new(BinaryResponse) + err := c.cc.Invoke(ctx, "/main.CounterService/EchoBinary", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *counterServiceClient) HTTPGet(ctx context.Context, in *HttpGetRequest, opts ...grpc.CallOption) (*HttpGetResponse, error) { out := new(HttpGetResponse) err := c.cc.Invoke(ctx, "/main.CounterService/HTTPGet", in, out, opts...) @@ -1537,6 +1677,7 @@ type CounterServiceServer interface { Increment(context.Context, *UnaryRequest) (*UnaryResponse, error) StreamingIncrements(*StreamingRequest, CounterService_StreamingIncrementsServer) error FailingIncrement(context.Context, *UnaryRequest) (*UnaryResponse, error) + EchoBinary(context.Context, *BinaryRequest) (*BinaryResponse, error) HTTPGet(context.Context, *HttpGetRequest) (*HttpGetResponse, error) HTTPPostWithNestedBodyPath(context.Context, *HttpPostRequest) (*HttpPostResponse, error) HTTPPostWithStarBodyPath(context.Context, *HttpPostRequest) (*HttpPostResponse, error) @@ -1560,6 +1701,9 @@ func (*UnimplementedCounterServiceServer) StreamingIncrements(*StreamingRequest, func (*UnimplementedCounterServiceServer) FailingIncrement(context.Context, *UnaryRequest) (*UnaryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FailingIncrement not implemented") } +func (*UnimplementedCounterServiceServer) EchoBinary(context.Context, *BinaryRequest) (*BinaryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EchoBinary not implemented") +} func (*UnimplementedCounterServiceServer) HTTPGet(context.Context, *HttpGetRequest) (*HttpGetResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method HTTPGet not implemented") } @@ -1646,6 +1790,24 @@ func _CounterService_FailingIncrement_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } +func _CounterService_EchoBinary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BinaryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CounterServiceServer).EchoBinary(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/main.CounterService/EchoBinary", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CounterServiceServer).EchoBinary(ctx, req.(*BinaryRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _CounterService_HTTPGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(HttpGetRequest) if err := dec(in); err != nil { @@ -1802,6 +1964,10 @@ var _CounterService_serviceDesc = grpc.ServiceDesc{ MethodName: "FailingIncrement", Handler: _CounterService_FailingIncrement_Handler, }, + { + MethodName: "EchoBinary", + Handler: _CounterService_EchoBinary_Handler, + }, { MethodName: "HTTPGet", Handler: _CounterService_HTTPGet_Handler, diff --git a/integration_tests/service.pb.gw.go b/integration_tests/service.pb.gw.go index c3ec24c..c2d98d9 100644 --- a/integration_tests/service.pb.gw.go +++ b/integration_tests/service.pb.gw.go @@ -126,6 +126,40 @@ func local_request_CounterService_FailingIncrement_0(ctx context.Context, marsha } +func request_CounterService_EchoBinary_0(ctx context.Context, marshaler runtime.Marshaler, client CounterServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq BinaryRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.EchoBinary(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_CounterService_EchoBinary_0(ctx context.Context, marshaler runtime.Marshaler, server CounterServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq BinaryRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.EchoBinary(ctx, &protoReq) + return msg, metadata, err + +} + func request_CounterService_HTTPGet_0(ctx context.Context, marshaler runtime.Marshaler, client CounterServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq HttpGetRequest var metadata runtime.ServerMetadata @@ -649,6 +683,29 @@ func RegisterCounterServiceHandlerServer(ctx context.Context, mux *runtime.Serve }) + mux.Handle("POST", pattern_CounterService_EchoBinary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_CounterService_EchoBinary_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CounterService_EchoBinary_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_CounterService_HTTPGet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -934,6 +991,26 @@ func RegisterCounterServiceHandlerClient(ctx context.Context, mux *runtime.Serve }) + mux.Handle("POST", pattern_CounterService_EchoBinary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_CounterService_EchoBinary_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CounterService_EchoBinary_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_CounterService_HTTPGet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1104,6 +1181,8 @@ var ( pattern_CounterService_FailingIncrement_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"main.CounterService", "FailingIncrement"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_CounterService_EchoBinary_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"main.CounterService", "EchoBinary"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_CounterService_HTTPGet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"api", "num_to_increase"}, "", runtime.AssumeColonVerbOpt(true))) pattern_CounterService_HTTPPostWithNestedBodyPath_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"post", "a"}, "", runtime.AssumeColonVerbOpt(true))) @@ -1128,6 +1207,8 @@ var ( forward_CounterService_FailingIncrement_0 = runtime.ForwardResponseMessage + forward_CounterService_EchoBinary_0 = runtime.ForwardResponseMessage + forward_CounterService_HTTPGet_0 = runtime.ForwardResponseMessage forward_CounterService_HTTPPostWithNestedBodyPath_0 = runtime.ForwardResponseMessage diff --git a/integration_tests/service.proto b/integration_tests/service.proto index bb00c98..1ade546 100644 --- a/integration_tests/service.proto +++ b/integration_tests/service.proto @@ -14,6 +14,14 @@ message UnaryResponse { int32 result = 1; } +message BinaryRequest { + bytes data = 1; +} + +message BinaryResponse { + bytes data = 1; +} + message StreamingRequest { int32 counter = 1; } @@ -90,6 +98,7 @@ service CounterService { rpc Increment(UnaryRequest) returns (UnaryResponse); rpc StreamingIncrements(StreamingRequest) returns (stream StreamingResponse); rpc FailingIncrement(UnaryRequest) returns (UnaryResponse); + rpc EchoBinary(BinaryRequest) returns (BinaryResponse); rpc HTTPGet(HttpGetRequest) returns (HttpGetResponse) { option (google.api.http) = { get: "/api/{num_to_increase}"