| // vim: noexpandtab |
| |
| // Code generated by protoc-gen-go. DO NOT EDIT. |
| // versions: |
| // protoc-gen-go v1.26.0 |
| // protoc v3.17.0 |
| // source: go.chromium.org/luci/common/proto/google/descutil/util_test.proto |
| |
| package descutil |
| |
| import prpc "go.chromium.org/luci/grpc/prpc" |
| |
| import ( |
| context "context" |
| grpc "google.golang.org/grpc" |
| codes "google.golang.org/grpc/codes" |
| status "google.golang.org/grpc/status" |
| protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| descriptorpb "google.golang.org/protobuf/types/descriptorpb" |
| reflect "reflect" |
| sync "sync" |
| ) |
| |
| const ( |
| // Verify that this generated code is sufficiently up-to-date. |
| _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
| // Verify that runtime/protoimpl is sufficiently up-to-date. |
| _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
| ) |
| |
| // Enum comment. |
| // next line. |
| type E1 int32 |
| |
| const ( |
| // V0 |
| // next line. |
| E1_V0 E1 = 0 |
| // V1 |
| // next line. |
| E1_V1 E1 = 1 |
| ) |
| |
| // Enum value maps for E1. |
| var ( |
| E1_name = map[int32]string{ |
| 0: "V0", |
| 1: "V1", |
| } |
| E1_value = map[string]int32{ |
| "V0": 0, |
| "V1": 1, |
| } |
| ) |
| |
| func (x E1) Enum() *E1 { |
| p := new(E1) |
| *p = x |
| return p |
| } |
| |
| func (x E1) String() string { |
| return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |
| } |
| |
| func (E1) Descriptor() protoreflect.EnumDescriptor { |
| return file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_enumTypes[0].Descriptor() |
| } |
| |
| func (E1) Type() protoreflect.EnumType { |
| return &file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_enumTypes[0] |
| } |
| |
| func (x E1) Number() protoreflect.EnumNumber { |
| return protoreflect.EnumNumber(x) |
| } |
| |
| // Deprecated: Use E1.Descriptor instead. |
| func (E1) EnumDescriptor() ([]byte, []int) { |
| return file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_rawDescGZIP(), []int{0} |
| } |
| |
| type NestedMessageParent_NestedEnum int32 |
| |
| const ( |
| NestedMessageParent_V0 NestedMessageParent_NestedEnum = 0 |
| NestedMessageParent_V1 NestedMessageParent_NestedEnum = 1 |
| ) |
| |
| // Enum value maps for NestedMessageParent_NestedEnum. |
| var ( |
| NestedMessageParent_NestedEnum_name = map[int32]string{ |
| 0: "V0", |
| 1: "V1", |
| } |
| NestedMessageParent_NestedEnum_value = map[string]int32{ |
| "V0": 0, |
| "V1": 1, |
| } |
| ) |
| |
| func (x NestedMessageParent_NestedEnum) Enum() *NestedMessageParent_NestedEnum { |
| p := new(NestedMessageParent_NestedEnum) |
| *p = x |
| return p |
| } |
| |
| func (x NestedMessageParent_NestedEnum) String() string { |
| return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |
| } |
| |
| func (NestedMessageParent_NestedEnum) Descriptor() protoreflect.EnumDescriptor { |
| return file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_enumTypes[1].Descriptor() |
| } |
| |
| func (NestedMessageParent_NestedEnum) Type() protoreflect.EnumType { |
| return &file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_enumTypes[1] |
| } |
| |
| func (x NestedMessageParent_NestedEnum) Number() protoreflect.EnumNumber { |
| return protoreflect.EnumNumber(x) |
| } |
| |
| // Deprecated: Use NestedMessageParent_NestedEnum.Descriptor instead. |
| func (NestedMessageParent_NestedEnum) EnumDescriptor() ([]byte, []int) { |
| return file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_rawDescGZIP(), []int{4, 0} |
| } |
| |
| type SuperExt struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| A string `protobuf:"bytes,1,opt,name=a,proto3" json:"a,omitempty"` |
| B string `protobuf:"bytes,2,opt,name=b,proto3" json:"b,omitempty"` |
| } |
| |
| func (x *SuperExt) Reset() { |
| *x = SuperExt{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_msgTypes[0] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *SuperExt) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*SuperExt) ProtoMessage() {} |
| |
| func (x *SuperExt) ProtoReflect() protoreflect.Message { |
| mi := &file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_msgTypes[0] |
| 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 SuperExt.ProtoReflect.Descriptor instead. |
| func (*SuperExt) Descriptor() ([]byte, []int) { |
| return file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_rawDescGZIP(), []int{0} |
| } |
| |
| func (x *SuperExt) GetA() string { |
| if x != nil { |
| return x.A |
| } |
| return "" |
| } |
| |
| func (x *SuperExt) GetB() string { |
| if x != nil { |
| return x.B |
| } |
| return "" |
| } |
| |
| // M1 |
| // next line. |
| type M1 struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| // f1 |
| // next line. |
| F1 string `protobuf:"bytes,1,opt,name=f1,json=foof,proto3" json:"f1,omitempty"` |
| Meep []int64 `protobuf:"varint,2,rep,name=meep,proto3" json:"meep,omitempty"` |
| RegularSnakeCase bool `protobuf:"varint,3,opt,name=regular_snake_case,json=regularSnakeCase,proto3" json:"regular_snake_case,omitempty"` |
| OnlyJsonName bool `protobuf:"varint,4,opt,name=only_json_name,json=cool,proto3" json:"only_json_name,omitempty"` |
| } |
| |
| func (x *M1) Reset() { |
| *x = M1{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_msgTypes[1] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *M1) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*M1) ProtoMessage() {} |
| |
| func (x *M1) ProtoReflect() protoreflect.Message { |
| mi := &file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_msgTypes[1] |
| 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 M1.ProtoReflect.Descriptor instead. |
| func (*M1) Descriptor() ([]byte, []int) { |
| return file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_rawDescGZIP(), []int{1} |
| } |
| |
| func (x *M1) GetF1() string { |
| if x != nil { |
| return x.F1 |
| } |
| return "" |
| } |
| |
| func (x *M1) GetMeep() []int64 { |
| if x != nil { |
| return x.Meep |
| } |
| return nil |
| } |
| |
| func (x *M1) GetRegularSnakeCase() bool { |
| if x != nil { |
| return x.RegularSnakeCase |
| } |
| return false |
| } |
| |
| func (x *M1) GetOnlyJsonName() bool { |
| if x != nil { |
| return x.OnlyJsonName |
| } |
| return false |
| } |
| |
| // M2 |
| // next line. |
| // |
| // Deprecated: Do not use. |
| type M2 struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| // f1 |
| // next line. |
| F1 []*M1 `protobuf:"bytes,1,rep,name=f1,proto3" json:"f1,omitempty"` |
| // f2 |
| // next line. |
| F2 E1 `protobuf:"varint,2,opt,name=f2,proto3,enum=descutil.E1" json:"f2,omitempty"` |
| } |
| |
| func (x *M2) Reset() { |
| *x = M2{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_msgTypes[2] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *M2) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*M2) ProtoMessage() {} |
| |
| func (x *M2) ProtoReflect() protoreflect.Message { |
| mi := &file_go_chromium_org_luci_common_proto_google_descutil_util_test_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 M2.ProtoReflect.Descriptor instead. |
| func (*M2) Descriptor() ([]byte, []int) { |
| return file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_rawDescGZIP(), []int{2} |
| } |
| |
| func (x *M2) GetF1() []*M1 { |
| if x != nil { |
| return x.F1 |
| } |
| return nil |
| } |
| |
| func (x *M2) GetF2() E1 { |
| if x != nil { |
| return x.F2 |
| } |
| return E1_V0 |
| } |
| |
| // M3 |
| type M3 struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| // O1 |
| // |
| // Types that are assignable to O1: |
| // *M3_F1 |
| // *M3_F2 |
| O1 isM3_O1 `protobuf_oneof:"O1"` |
| // O2 |
| // |
| // Types that are assignable to O2: |
| // *M3_F3 |
| // *M3_F4 |
| O2 isM3_O2 `protobuf_oneof:"O2"` |
| // f5 |
| F5 string `protobuf:"bytes,5,opt,name=f5,proto3" json:"f5,omitempty"` |
| // f6 |
| F6 int32 `protobuf:"varint,6,opt,name=f6,proto3" json:"f6,omitempty"` |
| } |
| |
| func (x *M3) Reset() { |
| *x = M3{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_msgTypes[3] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *M3) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*M3) ProtoMessage() {} |
| |
| func (x *M3) ProtoReflect() protoreflect.Message { |
| mi := &file_go_chromium_org_luci_common_proto_google_descutil_util_test_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 M3.ProtoReflect.Descriptor instead. |
| func (*M3) Descriptor() ([]byte, []int) { |
| return file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_rawDescGZIP(), []int{3} |
| } |
| |
| func (m *M3) GetO1() isM3_O1 { |
| if m != nil { |
| return m.O1 |
| } |
| return nil |
| } |
| |
| func (x *M3) GetF1() int32 { |
| if x, ok := x.GetO1().(*M3_F1); ok { |
| return x.F1 |
| } |
| return 0 |
| } |
| |
| func (x *M3) GetF2() int32 { |
| if x, ok := x.GetO1().(*M3_F2); ok { |
| return x.F2 |
| } |
| return 0 |
| } |
| |
| func (m *M3) GetO2() isM3_O2 { |
| if m != nil { |
| return m.O2 |
| } |
| return nil |
| } |
| |
| func (x *M3) GetF3() int32 { |
| if x, ok := x.GetO2().(*M3_F3); ok { |
| return x.F3 |
| } |
| return 0 |
| } |
| |
| func (x *M3) GetF4() int32 { |
| if x, ok := x.GetO2().(*M3_F4); ok { |
| return x.F4 |
| } |
| return 0 |
| } |
| |
| func (x *M3) GetF5() string { |
| if x != nil { |
| return x.F5 |
| } |
| return "" |
| } |
| |
| func (x *M3) GetF6() int32 { |
| if x != nil { |
| return x.F6 |
| } |
| return 0 |
| } |
| |
| type isM3_O1 interface { |
| isM3_O1() |
| } |
| |
| type M3_F1 struct { |
| // f1 |
| F1 int32 `protobuf:"varint,1,opt,name=f1,proto3,oneof"` |
| } |
| |
| type M3_F2 struct { |
| // f2 |
| F2 int32 `protobuf:"varint,2,opt,name=f2,proto3,oneof"` |
| } |
| |
| func (*M3_F1) isM3_O1() {} |
| |
| func (*M3_F2) isM3_O1() {} |
| |
| type isM3_O2 interface { |
| isM3_O2() |
| } |
| |
| type M3_F3 struct { |
| // f3 |
| F3 int32 `protobuf:"varint,3,opt,name=f3,proto3,oneof"` |
| } |
| |
| type M3_F4 struct { |
| // f4 |
| F4 int32 `protobuf:"varint,4,opt,name=f4,proto3,oneof"` |
| } |
| |
| func (*M3_F3) isM3_O2() {} |
| |
| func (*M3_F4) isM3_O2() {} |
| |
| type NestedMessageParent struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| } |
| |
| func (x *NestedMessageParent) Reset() { |
| *x = NestedMessageParent{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_msgTypes[4] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *NestedMessageParent) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*NestedMessageParent) ProtoMessage() {} |
| |
| func (x *NestedMessageParent) ProtoReflect() protoreflect.Message { |
| mi := &file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_msgTypes[4] |
| 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 NestedMessageParent.ProtoReflect.Descriptor instead. |
| func (*NestedMessageParent) Descriptor() ([]byte, []int) { |
| return file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_rawDescGZIP(), []int{4} |
| } |
| |
| type ReservedRangeContainer struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| } |
| |
| func (x *ReservedRangeContainer) Reset() { |
| *x = ReservedRangeContainer{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_msgTypes[5] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *ReservedRangeContainer) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*ReservedRangeContainer) ProtoMessage() {} |
| |
| func (x *ReservedRangeContainer) ProtoReflect() protoreflect.Message { |
| mi := &file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_msgTypes[5] |
| 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 ReservedRangeContainer.ProtoReflect.Descriptor instead. |
| func (*ReservedRangeContainer) Descriptor() ([]byte, []int) { |
| return file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_rawDescGZIP(), []int{5} |
| } |
| |
| type NestedMessageParent_NestedMessage struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| F1 int32 `protobuf:"varint,1,opt,name=f1,proto3" json:"f1,omitempty"` |
| F2 int32 `protobuf:"varint,2,opt,name=f2,proto3" json:"f2,omitempty"` |
| } |
| |
| func (x *NestedMessageParent_NestedMessage) Reset() { |
| *x = NestedMessageParent_NestedMessage{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_msgTypes[6] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *NestedMessageParent_NestedMessage) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*NestedMessageParent_NestedMessage) ProtoMessage() {} |
| |
| func (x *NestedMessageParent_NestedMessage) ProtoReflect() protoreflect.Message { |
| mi := &file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_msgTypes[6] |
| 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 NestedMessageParent_NestedMessage.ProtoReflect.Descriptor instead. |
| func (*NestedMessageParent_NestedMessage) Descriptor() ([]byte, []int) { |
| return file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_rawDescGZIP(), []int{4, 0} |
| } |
| |
| func (x *NestedMessageParent_NestedMessage) GetF1() int32 { |
| if x != nil { |
| return x.F1 |
| } |
| return 0 |
| } |
| |
| func (x *NestedMessageParent_NestedMessage) GetF2() int32 { |
| if x != nil { |
| return x.F2 |
| } |
| return 0 |
| } |
| |
| var file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_extTypes = []protoimpl.ExtensionInfo{ |
| { |
| ExtendedType: (*descriptorpb.FieldOptions)(nil), |
| ExtensionType: (*string)(nil), |
| Field: 50001, |
| Name: "descutil.ext", |
| Tag: "bytes,50001,opt,name=ext", |
| Filename: "go.chromium.org/luci/common/proto/google/descutil/util_test.proto", |
| }, |
| { |
| ExtendedType: (*descriptorpb.FieldOptions)(nil), |
| ExtensionType: (*SuperExt)(nil), |
| Field: 50002, |
| Name: "descutil.super_ext", |
| Tag: "bytes,50002,opt,name=super_ext", |
| Filename: "go.chromium.org/luci/common/proto/google/descutil/util_test.proto", |
| }, |
| { |
| ExtendedType: (*descriptorpb.MessageOptions)(nil), |
| ExtensionType: (*string)(nil), |
| Field: 50001, |
| Name: "descutil.msgExt", |
| Tag: "bytes,50001,opt,name=msgExt", |
| Filename: "go.chromium.org/luci/common/proto/google/descutil/util_test.proto", |
| }, |
| { |
| ExtendedType: (*descriptorpb.MessageOptions)(nil), |
| ExtensionType: (*SuperExt)(nil), |
| Field: 50002, |
| Name: "descutil.super_msg_ext", |
| Tag: "bytes,50002,opt,name=super_msg_ext", |
| Filename: "go.chromium.org/luci/common/proto/google/descutil/util_test.proto", |
| }, |
| } |
| |
| // Extension fields to descriptorpb.FieldOptions. |
| var ( |
| // optional string ext = 50001; |
| E_Ext = &file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_extTypes[0] |
| // optional descutil.SuperExt super_ext = 50002; |
| E_SuperExt = &file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_extTypes[1] |
| ) |
| |
| // Extension fields to descriptorpb.MessageOptions. |
| var ( |
| // optional string msgExt = 50001; |
| E_MsgExt = &file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_extTypes[2] |
| // optional descutil.SuperExt super_msg_ext = 50002; |
| E_SuperMsgExt = &file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_extTypes[3] |
| ) |
| |
| var File_go_chromium_org_luci_common_proto_google_descutil_util_test_proto protoreflect.FileDescriptor |
| |
| var file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_rawDesc = []byte{ |
| 0x0a, 0x41, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, |
| 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, |
| 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x75, |
| 0x74, 0x69, 0x6c, 0x2f, 0x75, 0x74, 0x69, 0x6c, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, |
| 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x64, 0x65, 0x73, 0x63, 0x75, 0x74, 0x69, 0x6c, 0x1a, 0x20, 0x67, |
| 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, |
| 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, |
| 0x26, 0x0a, 0x08, 0x53, 0x75, 0x70, 0x65, 0x72, 0x45, 0x78, 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, 0x22, 0x90, 0x01, 0x0a, 0x02, 0x4d, 0x31, 0x12, 0x24, |
| 0x0a, 0x02, 0x66, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, 0x8a, 0xb5, 0x18, 0x04, |
| 0x6e, 0x61, 0x72, 0x66, 0x92, 0xb5, 0x18, 0x06, 0x0a, 0x01, 0x61, 0x12, 0x01, 0x62, 0x52, 0x04, |
| 0x66, 0x6f, 0x6f, 0x66, 0x12, 0x18, 0x0a, 0x04, 0x6d, 0x65, 0x65, 0x70, 0x18, 0x02, 0x20, 0x03, |
| 0x28, 0x03, 0x42, 0x04, 0x10, 0x00, 0x30, 0x02, 0x52, 0x04, 0x6d, 0x65, 0x65, 0x70, 0x12, 0x2c, |
| 0x0a, 0x12, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x5f, 0x73, 0x6e, 0x61, 0x6b, 0x65, 0x5f, |
| 0x63, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x72, 0x65, 0x67, 0x75, |
| 0x6c, 0x61, 0x72, 0x53, 0x6e, 0x61, 0x6b, 0x65, 0x43, 0x61, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x0e, |
| 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, |
| 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x63, 0x6f, 0x6f, 0x6c, 0x22, 0x5c, 0x0a, 0x02, 0x4d, 0x32, |
| 0x12, 0x1c, 0x0a, 0x02, 0x66, 0x31, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x64, |
| 0x65, 0x73, 0x63, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x4d, 0x31, 0x52, 0x02, 0x66, 0x31, 0x12, 0x1c, |
| 0x0a, 0x02, 0x66, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x64, 0x65, 0x73, |
| 0x63, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x45, 0x31, 0x52, 0x02, 0x66, 0x32, 0x3a, 0x1a, 0x18, 0x01, |
| 0x8a, 0xb5, 0x18, 0x03, 0x79, 0x65, 0x70, 0x92, 0xb5, 0x18, 0x0d, 0x0a, 0x04, 0x63, 0x6f, 0x6f, |
| 0x6c, 0x12, 0x05, 0x62, 0x65, 0x61, 0x6e, 0x73, 0x22, 0x78, 0x0a, 0x02, 0x4d, 0x33, 0x12, 0x10, |
| 0x0a, 0x02, 0x66, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x02, 0x66, 0x31, |
| 0x12, 0x10, 0x0a, 0x02, 0x66, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x02, |
| 0x66, 0x32, 0x12, 0x10, 0x0a, 0x02, 0x66, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, |
| 0x52, 0x02, 0x66, 0x33, 0x12, 0x10, 0x0a, 0x02, 0x66, 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, |
| 0x48, 0x01, 0x52, 0x02, 0x66, 0x34, 0x12, 0x0e, 0x0a, 0x02, 0x66, 0x35, 0x18, 0x05, 0x20, 0x01, |
| 0x28, 0x09, 0x52, 0x02, 0x66, 0x35, 0x12, 0x0e, 0x0a, 0x02, 0x66, 0x36, 0x18, 0x06, 0x20, 0x01, |
| 0x28, 0x05, 0x52, 0x02, 0x66, 0x36, 0x42, 0x04, 0x0a, 0x02, 0x4f, 0x31, 0x42, 0x04, 0x0a, 0x02, |
| 0x4f, 0x32, 0x22, 0x64, 0x0a, 0x13, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, |
| 0x61, 0x67, 0x65, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x1a, 0x2f, 0x0a, 0x0d, 0x4e, 0x65, 0x73, |
| 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x66, 0x31, |
| 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x66, 0x31, 0x12, 0x0e, 0x0a, 0x02, 0x66, 0x32, |
| 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x66, 0x32, 0x22, 0x1c, 0x0a, 0x0a, 0x4e, 0x65, |
| 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x30, 0x10, 0x00, |
| 0x12, 0x06, 0x0a, 0x02, 0x56, 0x31, 0x10, 0x01, 0x22, 0x32, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x65, |
| 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, |
| 0x65, 0x72, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x05, |
| 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x05, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2a, 0x14, 0x0a, 0x02, |
| 0x45, 0x31, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x30, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x31, |
| 0x10, 0x01, 0x32, 0x28, 0x0a, 0x02, 0x53, 0x31, 0x12, 0x22, 0x0a, 0x02, 0x52, 0x31, 0x12, 0x0c, |
| 0x2e, 0x64, 0x65, 0x73, 0x63, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x4d, 0x31, 0x1a, 0x0c, 0x2e, 0x64, |
| 0x65, 0x73, 0x63, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x4d, 0x32, 0x22, 0x00, 0x32, 0x4c, 0x0a, 0x02, |
| 0x53, 0x32, 0x12, 0x22, 0x0a, 0x02, 0x52, 0x31, 0x12, 0x0c, 0x2e, 0x64, 0x65, 0x73, 0x63, 0x75, |
| 0x74, 0x69, 0x6c, 0x2e, 0x4d, 0x31, 0x1a, 0x0c, 0x2e, 0x64, 0x65, 0x73, 0x63, 0x75, 0x74, 0x69, |
| 0x6c, 0x2e, 0x4d, 0x32, 0x22, 0x00, 0x12, 0x22, 0x0a, 0x02, 0x52, 0x32, 0x12, 0x0c, 0x2e, 0x64, |
| 0x65, 0x73, 0x63, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x4d, 0x31, 0x1a, 0x0c, 0x2e, 0x64, 0x65, 0x73, |
| 0x63, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x4d, 0x32, 0x22, 0x00, 0x3a, 0x31, 0x0a, 0x03, 0x65, 0x78, |
| 0x74, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, |
| 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, |
| 0x18, 0xd1, 0x86, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x78, 0x74, 0x3a, 0x50, 0x0a, |
| 0x09, 0x73, 0x75, 0x70, 0x65, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, |
| 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, |
| 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd2, 0x86, 0x03, 0x20, 0x01, 0x28, |
| 0x0b, 0x32, 0x12, 0x2e, 0x64, 0x65, 0x73, 0x63, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x53, 0x75, 0x70, |
| 0x65, 0x72, 0x45, 0x78, 0x74, 0x52, 0x08, 0x73, 0x75, 0x70, 0x65, 0x72, 0x45, 0x78, 0x74, 0x3a, |
| 0x39, 0x0a, 0x06, 0x6d, 0x73, 0x67, 0x45, 0x78, 0x74, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, |
| 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, |
| 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd1, 0x86, 0x03, 0x20, 0x01, |
| 0x28, 0x09, 0x52, 0x06, 0x6d, 0x73, 0x67, 0x45, 0x78, 0x74, 0x3a, 0x59, 0x0a, 0x0d, 0x73, 0x75, |
| 0x70, 0x65, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x65, 0x78, 0x74, 0x12, 0x1f, 0x2e, 0x67, 0x6f, |
| 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, |
| 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd2, 0x86, 0x03, |
| 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x64, 0x65, 0x73, 0x63, 0x75, 0x74, 0x69, 0x6c, 0x2e, |
| 0x53, 0x75, 0x70, 0x65, 0x72, 0x45, 0x78, 0x74, 0x52, 0x0b, 0x73, 0x75, 0x70, 0x65, 0x72, 0x4d, |
| 0x73, 0x67, 0x45, 0x78, 0x74, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, |
| 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x63, 0x6f, |
| 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, |
| 0x65, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x75, 0x74, 0x69, 0x6c, 0x3b, 0x64, 0x65, 0x73, 0x63, 0x75, |
| 0x74, 0x69, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, |
| } |
| |
| var ( |
| file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_rawDescOnce sync.Once |
| file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_rawDescData = file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_rawDesc |
| ) |
| |
| func file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_rawDescGZIP() []byte { |
| file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_rawDescOnce.Do(func() { |
| file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_rawDescData) |
| }) |
| return file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_rawDescData |
| } |
| |
| var file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_enumTypes = make([]protoimpl.EnumInfo, 2) |
| var file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_msgTypes = make([]protoimpl.MessageInfo, 7) |
| var file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_goTypes = []interface{}{ |
| (E1)(0), // 0: descutil.E1 |
| (NestedMessageParent_NestedEnum)(0), // 1: descutil.NestedMessageParent.NestedEnum |
| (*SuperExt)(nil), // 2: descutil.SuperExt |
| (*M1)(nil), // 3: descutil.M1 |
| (*M2)(nil), // 4: descutil.M2 |
| (*M3)(nil), // 5: descutil.M3 |
| (*NestedMessageParent)(nil), // 6: descutil.NestedMessageParent |
| (*ReservedRangeContainer)(nil), // 7: descutil.ReservedRangeContainer |
| (*NestedMessageParent_NestedMessage)(nil), // 8: descutil.NestedMessageParent.NestedMessage |
| (*descriptorpb.FieldOptions)(nil), // 9: google.protobuf.FieldOptions |
| (*descriptorpb.MessageOptions)(nil), // 10: google.protobuf.MessageOptions |
| } |
| var file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_depIdxs = []int32{ |
| 3, // 0: descutil.M2.f1:type_name -> descutil.M1 |
| 0, // 1: descutil.M2.f2:type_name -> descutil.E1 |
| 9, // 2: descutil.ext:extendee -> google.protobuf.FieldOptions |
| 9, // 3: descutil.super_ext:extendee -> google.protobuf.FieldOptions |
| 10, // 4: descutil.msgExt:extendee -> google.protobuf.MessageOptions |
| 10, // 5: descutil.super_msg_ext:extendee -> google.protobuf.MessageOptions |
| 2, // 6: descutil.super_ext:type_name -> descutil.SuperExt |
| 2, // 7: descutil.super_msg_ext:type_name -> descutil.SuperExt |
| 3, // 8: descutil.S1.R1:input_type -> descutil.M1 |
| 3, // 9: descutil.S2.R1:input_type -> descutil.M1 |
| 3, // 10: descutil.S2.R2:input_type -> descutil.M1 |
| 4, // 11: descutil.S1.R1:output_type -> descutil.M2 |
| 4, // 12: descutil.S2.R1:output_type -> descutil.M2 |
| 4, // 13: descutil.S2.R2:output_type -> descutil.M2 |
| 11, // [11:14] is the sub-list for method output_type |
| 8, // [8:11] is the sub-list for method input_type |
| 6, // [6:8] is the sub-list for extension type_name |
| 2, // [2:6] is the sub-list for extension extendee |
| 0, // [0:2] is the sub-list for field type_name |
| } |
| |
| func init() { file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_init() } |
| func file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_init() { |
| if File_go_chromium_org_luci_common_proto_google_descutil_util_test_proto != nil { |
| return |
| } |
| if !protoimpl.UnsafeEnabled { |
| file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*SuperExt); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*M1); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*M2); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*M3); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*NestedMessageParent); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*ReservedRangeContainer); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*NestedMessageParent_NestedMessage); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| } |
| file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_msgTypes[3].OneofWrappers = []interface{}{ |
| (*M3_F1)(nil), |
| (*M3_F2)(nil), |
| (*M3_F3)(nil), |
| (*M3_F4)(nil), |
| } |
| type x struct{} |
| out := protoimpl.TypeBuilder{ |
| File: protoimpl.DescBuilder{ |
| GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| RawDescriptor: file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_rawDesc, |
| NumEnums: 2, |
| NumMessages: 7, |
| NumExtensions: 4, |
| NumServices: 2, |
| }, |
| GoTypes: file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_goTypes, |
| DependencyIndexes: file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_depIdxs, |
| EnumInfos: file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_enumTypes, |
| MessageInfos: file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_msgTypes, |
| ExtensionInfos: file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_extTypes, |
| }.Build() |
| File_go_chromium_org_luci_common_proto_google_descutil_util_test_proto = out.File |
| file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_rawDesc = nil |
| file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_goTypes = nil |
| file_go_chromium_org_luci_common_proto_google_descutil_util_test_proto_depIdxs = nil |
| } |
| |
| // Reference imports to suppress errors if they are not otherwise used. |
| var _ context.Context |
| var _ grpc.ClientConnInterface |
| |
| // This is a compile-time assertion to ensure that this generated file |
| // is compatible with the grpc package it is being compiled against. |
| const _ = grpc.SupportPackageIsVersion6 |
| |
| // S1Client is the client API for S1 service. |
| // |
| // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. |
| type S1Client interface { |
| // R1 |
| R1(ctx context.Context, in *M1, opts ...grpc.CallOption) (*M2, error) |
| } |
| type s1PRPCClient struct { |
| client *prpc.Client |
| } |
| |
| func NewS1PRPCClient(client *prpc.Client) S1Client { |
| return &s1PRPCClient{client} |
| } |
| |
| func (c *s1PRPCClient) R1(ctx context.Context, in *M1, opts ...grpc.CallOption) (*M2, error) { |
| out := new(M2) |
| err := c.client.Call(ctx, "descutil.S1", "R1", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| type s1Client struct { |
| cc grpc.ClientConnInterface |
| } |
| |
| func NewS1Client(cc grpc.ClientConnInterface) S1Client { |
| return &s1Client{cc} |
| } |
| |
| func (c *s1Client) R1(ctx context.Context, in *M1, opts ...grpc.CallOption) (*M2, error) { |
| out := new(M2) |
| err := c.cc.Invoke(ctx, "/descutil.S1/R1", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| // S1Server is the server API for S1 service. |
| type S1Server interface { |
| // R1 |
| R1(context.Context, *M1) (*M2, error) |
| } |
| |
| // UnimplementedS1Server can be embedded to have forward compatible implementations. |
| type UnimplementedS1Server struct { |
| } |
| |
| func (*UnimplementedS1Server) R1(context.Context, *M1) (*M2, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method R1 not implemented") |
| } |
| |
| func RegisterS1Server(s prpc.Registrar, srv S1Server) { |
| s.RegisterService(&_S1_serviceDesc, srv) |
| } |
| |
| func _S1_R1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(M1) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(S1Server).R1(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/descutil.S1/R1", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(S1Server).R1(ctx, req.(*M1)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| var _S1_serviceDesc = grpc.ServiceDesc{ |
| ServiceName: "descutil.S1", |
| HandlerType: (*S1Server)(nil), |
| Methods: []grpc.MethodDesc{ |
| { |
| MethodName: "R1", |
| Handler: _S1_R1_Handler, |
| }, |
| }, |
| Streams: []grpc.StreamDesc{}, |
| Metadata: "go.chromium.org/luci/common/proto/google/descutil/util_test.proto", |
| } |
| |
| // S2Client is the client API for S2 service. |
| // |
| // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. |
| type S2Client interface { |
| // R1 |
| R1(ctx context.Context, in *M1, opts ...grpc.CallOption) (*M2, error) |
| // R2 |
| R2(ctx context.Context, in *M1, opts ...grpc.CallOption) (*M2, error) |
| } |
| type s2PRPCClient struct { |
| client *prpc.Client |
| } |
| |
| func NewS2PRPCClient(client *prpc.Client) S2Client { |
| return &s2PRPCClient{client} |
| } |
| |
| func (c *s2PRPCClient) R1(ctx context.Context, in *M1, opts ...grpc.CallOption) (*M2, error) { |
| out := new(M2) |
| err := c.client.Call(ctx, "descutil.S2", "R1", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| func (c *s2PRPCClient) R2(ctx context.Context, in *M1, opts ...grpc.CallOption) (*M2, error) { |
| out := new(M2) |
| err := c.client.Call(ctx, "descutil.S2", "R2", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| type s2Client struct { |
| cc grpc.ClientConnInterface |
| } |
| |
| func NewS2Client(cc grpc.ClientConnInterface) S2Client { |
| return &s2Client{cc} |
| } |
| |
| func (c *s2Client) R1(ctx context.Context, in *M1, opts ...grpc.CallOption) (*M2, error) { |
| out := new(M2) |
| err := c.cc.Invoke(ctx, "/descutil.S2/R1", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| func (c *s2Client) R2(ctx context.Context, in *M1, opts ...grpc.CallOption) (*M2, error) { |
| out := new(M2) |
| err := c.cc.Invoke(ctx, "/descutil.S2/R2", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| // S2Server is the server API for S2 service. |
| type S2Server interface { |
| // R1 |
| R1(context.Context, *M1) (*M2, error) |
| // R2 |
| R2(context.Context, *M1) (*M2, error) |
| } |
| |
| // UnimplementedS2Server can be embedded to have forward compatible implementations. |
| type UnimplementedS2Server struct { |
| } |
| |
| func (*UnimplementedS2Server) R1(context.Context, *M1) (*M2, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method R1 not implemented") |
| } |
| func (*UnimplementedS2Server) R2(context.Context, *M1) (*M2, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method R2 not implemented") |
| } |
| |
| func RegisterS2Server(s prpc.Registrar, srv S2Server) { |
| s.RegisterService(&_S2_serviceDesc, srv) |
| } |
| |
| func _S2_R1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(M1) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(S2Server).R1(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/descutil.S2/R1", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(S2Server).R1(ctx, req.(*M1)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| func _S2_R2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(M1) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(S2Server).R2(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/descutil.S2/R2", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(S2Server).R2(ctx, req.(*M1)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| var _S2_serviceDesc = grpc.ServiceDesc{ |
| ServiceName: "descutil.S2", |
| HandlerType: (*S2Server)(nil), |
| Methods: []grpc.MethodDesc{ |
| { |
| MethodName: "R1", |
| Handler: _S2_R1_Handler, |
| }, |
| { |
| MethodName: "R2", |
| Handler: _S2_R2_Handler, |
| }, |
| }, |
| Streams: []grpc.StreamDesc{}, |
| Metadata: "go.chromium.org/luci/common/proto/google/descutil/util_test.proto", |
| } |