go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/grpc/internal/svctool/testdata/test.pb.go (about) 1 // Copyright 2016 The LUCI Authors. All rights reserved. 2 // Use of this source code is governed under the Apache License, Version 2.0 3 // that can be found in the LICENSE file. 4 5 // Code generated by protoc-gen-go. DO NOT EDIT. 6 // versions: 7 // protoc-gen-go v1.26.0 8 // protoc v3.17.0 9 // source: go.chromium.org/luci/grpc/internal/svctool/testdata/test.proto 10 11 package test 12 13 import prpc "go.chromium.org/luci/grpc/prpc" 14 15 import ( 16 context "context" 17 sub "go.chromium.org/luci/grpc/internal/svctool/testdata/sub" 18 grpc "google.golang.org/grpc" 19 codes "google.golang.org/grpc/codes" 20 status "google.golang.org/grpc/status" 21 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 22 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 23 emptypb "google.golang.org/protobuf/types/known/emptypb" 24 reflect "reflect" 25 sync "sync" 26 ) 27 28 const ( 29 // Verify that this generated code is sufficiently up-to-date. 30 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 31 // Verify that runtime/protoimpl is sufficiently up-to-date. 32 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 33 ) 34 35 // The request message containing the user's name. 36 type M1 struct { 37 state protoimpl.MessageState 38 sizeCache protoimpl.SizeCache 39 unknownFields protoimpl.UnknownFields 40 41 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 42 } 43 44 func (x *M1) Reset() { 45 *x = M1{} 46 if protoimpl.UnsafeEnabled { 47 mi := &file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_msgTypes[0] 48 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 49 ms.StoreMessageInfo(mi) 50 } 51 } 52 53 func (x *M1) String() string { 54 return protoimpl.X.MessageStringOf(x) 55 } 56 57 func (*M1) ProtoMessage() {} 58 59 func (x *M1) ProtoReflect() protoreflect.Message { 60 mi := &file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_msgTypes[0] 61 if protoimpl.UnsafeEnabled && x != nil { 62 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 63 if ms.LoadMessageInfo() == nil { 64 ms.StoreMessageInfo(mi) 65 } 66 return ms 67 } 68 return mi.MessageOf(x) 69 } 70 71 // Deprecated: Use M1.ProtoReflect.Descriptor instead. 72 func (*M1) Descriptor() ([]byte, []int) { 73 return file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_rawDescGZIP(), []int{0} 74 } 75 76 func (x *M1) GetName() string { 77 if x != nil { 78 return x.Name 79 } 80 return "" 81 } 82 83 // The response message containing the greetings 84 type M2 struct { 85 state protoimpl.MessageState 86 sizeCache protoimpl.SizeCache 87 unknownFields protoimpl.UnknownFields 88 89 Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` 90 } 91 92 func (x *M2) Reset() { 93 *x = M2{} 94 if protoimpl.UnsafeEnabled { 95 mi := &file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_msgTypes[1] 96 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 97 ms.StoreMessageInfo(mi) 98 } 99 } 100 101 func (x *M2) String() string { 102 return protoimpl.X.MessageStringOf(x) 103 } 104 105 func (*M2) ProtoMessage() {} 106 107 func (x *M2) ProtoReflect() protoreflect.Message { 108 mi := &file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_msgTypes[1] 109 if protoimpl.UnsafeEnabled && x != nil { 110 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 111 if ms.LoadMessageInfo() == nil { 112 ms.StoreMessageInfo(mi) 113 } 114 return ms 115 } 116 return mi.MessageOf(x) 117 } 118 119 // Deprecated: Use M2.ProtoReflect.Descriptor instead. 120 func (*M2) Descriptor() ([]byte, []int) { 121 return file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_rawDescGZIP(), []int{1} 122 } 123 124 func (x *M2) GetMessage() string { 125 if x != nil { 126 return x.Message 127 } 128 return "" 129 } 130 131 type Void struct { 132 state protoimpl.MessageState 133 sizeCache protoimpl.SizeCache 134 unknownFields protoimpl.UnknownFields 135 } 136 137 func (x *Void) Reset() { 138 *x = Void{} 139 if protoimpl.UnsafeEnabled { 140 mi := &file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_msgTypes[2] 141 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 142 ms.StoreMessageInfo(mi) 143 } 144 } 145 146 func (x *Void) String() string { 147 return protoimpl.X.MessageStringOf(x) 148 } 149 150 func (*Void) ProtoMessage() {} 151 152 func (x *Void) ProtoReflect() protoreflect.Message { 153 mi := &file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_msgTypes[2] 154 if protoimpl.UnsafeEnabled && x != nil { 155 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 156 if ms.LoadMessageInfo() == nil { 157 ms.StoreMessageInfo(mi) 158 } 159 return ms 160 } 161 return mi.MessageOf(x) 162 } 163 164 // Deprecated: Use Void.ProtoReflect.Descriptor instead. 165 func (*Void) Descriptor() ([]byte, []int) { 166 return file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_rawDescGZIP(), []int{2} 167 } 168 169 var File_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto protoreflect.FileDescriptor 170 171 var file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_rawDesc = []byte{ 172 0x0a, 0x3e, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 173 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x69, 0x6e, 0x74, 0x65, 174 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x73, 0x76, 0x63, 0x74, 0x6f, 0x6f, 0x6c, 0x2f, 0x74, 0x65, 0x73, 175 0x74, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 176 0x12, 0x04, 0x74, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 177 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x67, 0x72, 0x70, 178 0x63, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x73, 0x76, 0x63, 0x74, 0x6f, 179 0x6f, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x73, 0x75, 0x62, 0x2f, 180 0x73, 0x75, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 181 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 182 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x18, 0x0a, 0x02, 0x4d, 0x31, 0x12, 0x12, 0x0a, 0x04, 183 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 184 0x22, 0x1e, 0x0a, 0x02, 0x4d, 0x32, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 185 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 186 0x22, 0x06, 0x0a, 0x04, 0x56, 0x6f, 0x69, 0x64, 0x32, 0x1f, 0x0a, 0x02, 0x53, 0x31, 0x12, 0x19, 187 0x0a, 0x01, 0x4d, 0x12, 0x08, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x31, 0x1a, 0x08, 0x2e, 188 0x74, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x32, 0x22, 0x00, 0x32, 0x6d, 0x0a, 0x02, 0x53, 0x32, 0x12, 189 0x1d, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x0a, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x6f, 190 0x69, 0x64, 0x1a, 0x08, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x31, 0x22, 0x00, 0x12, 0x1d, 191 0x0a, 0x03, 0x53, 0x65, 0x74, 0x12, 0x08, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x31, 0x1a, 192 0x0a, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x6f, 0x69, 0x64, 0x22, 0x00, 0x12, 0x29, 0x0a, 193 0x03, 0x49, 0x6d, 0x70, 0x12, 0x08, 0x2e, 0x73, 0x75, 0x62, 0x2e, 0x53, 0x75, 0x62, 0x1a, 0x16, 194 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 195 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x6f, 0x2e, 0x63, 196 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 197 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x73, 198 0x76, 0x63, 0x74, 0x6f, 0x6f, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x3b, 199 0x74, 0x65, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 200 } 201 202 var ( 203 file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_rawDescOnce sync.Once 204 file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_rawDescData = file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_rawDesc 205 ) 206 207 func file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_rawDescGZIP() []byte { 208 file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_rawDescOnce.Do(func() { 209 file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_rawDescData) 210 }) 211 return file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_rawDescData 212 } 213 214 var file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_msgTypes = make([]protoimpl.MessageInfo, 3) 215 var file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_goTypes = []interface{}{ 216 (*M1)(nil), // 0: test.M1 217 (*M2)(nil), // 1: test.M2 218 (*Void)(nil), // 2: test.Void 219 (*sub.Sub)(nil), // 3: sub.Sub 220 (*emptypb.Empty)(nil), // 4: google.protobuf.Empty 221 } 222 var file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_depIdxs = []int32{ 223 0, // 0: test.S1.M:input_type -> test.M1 224 2, // 1: test.S2.Get:input_type -> test.Void 225 0, // 2: test.S2.Set:input_type -> test.M1 226 3, // 3: test.S2.Imp:input_type -> sub.Sub 227 1, // 4: test.S1.M:output_type -> test.M2 228 0, // 5: test.S2.Get:output_type -> test.M1 229 2, // 6: test.S2.Set:output_type -> test.Void 230 4, // 7: test.S2.Imp:output_type -> google.protobuf.Empty 231 4, // [4:8] is the sub-list for method output_type 232 0, // [0:4] is the sub-list for method input_type 233 0, // [0:0] is the sub-list for extension type_name 234 0, // [0:0] is the sub-list for extension extendee 235 0, // [0:0] is the sub-list for field type_name 236 } 237 238 func init() { file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_init() } 239 func file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_init() { 240 if File_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto != nil { 241 return 242 } 243 if !protoimpl.UnsafeEnabled { 244 file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 245 switch v := v.(*M1); i { 246 case 0: 247 return &v.state 248 case 1: 249 return &v.sizeCache 250 case 2: 251 return &v.unknownFields 252 default: 253 return nil 254 } 255 } 256 file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 257 switch v := v.(*M2); i { 258 case 0: 259 return &v.state 260 case 1: 261 return &v.sizeCache 262 case 2: 263 return &v.unknownFields 264 default: 265 return nil 266 } 267 } 268 file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 269 switch v := v.(*Void); i { 270 case 0: 271 return &v.state 272 case 1: 273 return &v.sizeCache 274 case 2: 275 return &v.unknownFields 276 default: 277 return nil 278 } 279 } 280 } 281 type x struct{} 282 out := protoimpl.TypeBuilder{ 283 File: protoimpl.DescBuilder{ 284 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 285 RawDescriptor: file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_rawDesc, 286 NumEnums: 0, 287 NumMessages: 3, 288 NumExtensions: 0, 289 NumServices: 2, 290 }, 291 GoTypes: file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_goTypes, 292 DependencyIndexes: file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_depIdxs, 293 MessageInfos: file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_msgTypes, 294 }.Build() 295 File_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto = out.File 296 file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_rawDesc = nil 297 file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_goTypes = nil 298 file_go_chromium_org_luci_grpc_internal_svctool_testdata_test_proto_depIdxs = nil 299 } 300 301 // Reference imports to suppress errors if they are not otherwise used. 302 var _ context.Context 303 var _ grpc.ClientConnInterface 304 305 // This is a compile-time assertion to ensure that this generated file 306 // is compatible with the grpc package it is being compiled against. 307 const _ = grpc.SupportPackageIsVersion6 308 309 // S1Client is the client API for S1 service. 310 // 311 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 312 type S1Client interface { 313 M(ctx context.Context, in *M1, opts ...grpc.CallOption) (*M2, error) 314 } 315 type s1PRPCClient struct { 316 client *prpc.Client 317 } 318 319 func NewS1PRPCClient(client *prpc.Client) S1Client { 320 return &s1PRPCClient{client} 321 } 322 323 func (c *s1PRPCClient) M(ctx context.Context, in *M1, opts ...grpc.CallOption) (*M2, error) { 324 out := new(M2) 325 err := c.client.Call(ctx, "test.S1", "M", in, out, opts...) 326 if err != nil { 327 return nil, err 328 } 329 return out, nil 330 } 331 332 type s1Client struct { 333 cc grpc.ClientConnInterface 334 } 335 336 func NewS1Client(cc grpc.ClientConnInterface) S1Client { 337 return &s1Client{cc} 338 } 339 340 func (c *s1Client) M(ctx context.Context, in *M1, opts ...grpc.CallOption) (*M2, error) { 341 out := new(M2) 342 err := c.cc.Invoke(ctx, "/test.S1/M", in, out, opts...) 343 if err != nil { 344 return nil, err 345 } 346 return out, nil 347 } 348 349 // S1Server is the server API for S1 service. 350 type S1Server interface { 351 M(context.Context, *M1) (*M2, error) 352 } 353 354 // UnimplementedS1Server can be embedded to have forward compatible implementations. 355 type UnimplementedS1Server struct { 356 } 357 358 func (*UnimplementedS1Server) M(context.Context, *M1) (*M2, error) { 359 return nil, status.Errorf(codes.Unimplemented, "method M not implemented") 360 } 361 362 func RegisterS1Server(s prpc.Registrar, srv S1Server) { 363 s.RegisterService(&_S1_serviceDesc, srv) 364 } 365 366 func _S1_M_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 367 in := new(M1) 368 if err := dec(in); err != nil { 369 return nil, err 370 } 371 if interceptor == nil { 372 return srv.(S1Server).M(ctx, in) 373 } 374 info := &grpc.UnaryServerInfo{ 375 Server: srv, 376 FullMethod: "/test.S1/M", 377 } 378 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 379 return srv.(S1Server).M(ctx, req.(*M1)) 380 } 381 return interceptor(ctx, in, info, handler) 382 } 383 384 var _S1_serviceDesc = grpc.ServiceDesc{ 385 ServiceName: "test.S1", 386 HandlerType: (*S1Server)(nil), 387 Methods: []grpc.MethodDesc{ 388 { 389 MethodName: "M", 390 Handler: _S1_M_Handler, 391 }, 392 }, 393 Streams: []grpc.StreamDesc{}, 394 Metadata: "go.chromium.org/luci/grpc/internal/svctool/testdata/test.proto", 395 } 396 397 // S2Client is the client API for S2 service. 398 // 399 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 400 type S2Client interface { 401 Get(ctx context.Context, in *Void, opts ...grpc.CallOption) (*M1, error) 402 Set(ctx context.Context, in *M1, opts ...grpc.CallOption) (*Void, error) 403 Imp(ctx context.Context, in *sub.Sub, opts ...grpc.CallOption) (*emptypb.Empty, error) 404 } 405 type s2PRPCClient struct { 406 client *prpc.Client 407 } 408 409 func NewS2PRPCClient(client *prpc.Client) S2Client { 410 return &s2PRPCClient{client} 411 } 412 413 func (c *s2PRPCClient) Get(ctx context.Context, in *Void, opts ...grpc.CallOption) (*M1, error) { 414 out := new(M1) 415 err := c.client.Call(ctx, "test.S2", "Get", in, out, opts...) 416 if err != nil { 417 return nil, err 418 } 419 return out, nil 420 } 421 422 func (c *s2PRPCClient) Set(ctx context.Context, in *M1, opts ...grpc.CallOption) (*Void, error) { 423 out := new(Void) 424 err := c.client.Call(ctx, "test.S2", "Set", in, out, opts...) 425 if err != nil { 426 return nil, err 427 } 428 return out, nil 429 } 430 431 func (c *s2PRPCClient) Imp(ctx context.Context, in *sub.Sub, opts ...grpc.CallOption) (*emptypb.Empty, error) { 432 out := new(emptypb.Empty) 433 err := c.client.Call(ctx, "test.S2", "Imp", in, out, opts...) 434 if err != nil { 435 return nil, err 436 } 437 return out, nil 438 } 439 440 type s2Client struct { 441 cc grpc.ClientConnInterface 442 } 443 444 func NewS2Client(cc grpc.ClientConnInterface) S2Client { 445 return &s2Client{cc} 446 } 447 448 func (c *s2Client) Get(ctx context.Context, in *Void, opts ...grpc.CallOption) (*M1, error) { 449 out := new(M1) 450 err := c.cc.Invoke(ctx, "/test.S2/Get", in, out, opts...) 451 if err != nil { 452 return nil, err 453 } 454 return out, nil 455 } 456 457 func (c *s2Client) Set(ctx context.Context, in *M1, opts ...grpc.CallOption) (*Void, error) { 458 out := new(Void) 459 err := c.cc.Invoke(ctx, "/test.S2/Set", in, out, opts...) 460 if err != nil { 461 return nil, err 462 } 463 return out, nil 464 } 465 466 func (c *s2Client) Imp(ctx context.Context, in *sub.Sub, opts ...grpc.CallOption) (*emptypb.Empty, error) { 467 out := new(emptypb.Empty) 468 err := c.cc.Invoke(ctx, "/test.S2/Imp", in, out, opts...) 469 if err != nil { 470 return nil, err 471 } 472 return out, nil 473 } 474 475 // S2Server is the server API for S2 service. 476 type S2Server interface { 477 Get(context.Context, *Void) (*M1, error) 478 Set(context.Context, *M1) (*Void, error) 479 Imp(context.Context, *sub.Sub) (*emptypb.Empty, error) 480 } 481 482 // UnimplementedS2Server can be embedded to have forward compatible implementations. 483 type UnimplementedS2Server struct { 484 } 485 486 func (*UnimplementedS2Server) Get(context.Context, *Void) (*M1, error) { 487 return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") 488 } 489 func (*UnimplementedS2Server) Set(context.Context, *M1) (*Void, error) { 490 return nil, status.Errorf(codes.Unimplemented, "method Set not implemented") 491 } 492 func (*UnimplementedS2Server) Imp(context.Context, *sub.Sub) (*emptypb.Empty, error) { 493 return nil, status.Errorf(codes.Unimplemented, "method Imp not implemented") 494 } 495 496 func RegisterS2Server(s prpc.Registrar, srv S2Server) { 497 s.RegisterService(&_S2_serviceDesc, srv) 498 } 499 500 func _S2_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 501 in := new(Void) 502 if err := dec(in); err != nil { 503 return nil, err 504 } 505 if interceptor == nil { 506 return srv.(S2Server).Get(ctx, in) 507 } 508 info := &grpc.UnaryServerInfo{ 509 Server: srv, 510 FullMethod: "/test.S2/Get", 511 } 512 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 513 return srv.(S2Server).Get(ctx, req.(*Void)) 514 } 515 return interceptor(ctx, in, info, handler) 516 } 517 518 func _S2_Set_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 519 in := new(M1) 520 if err := dec(in); err != nil { 521 return nil, err 522 } 523 if interceptor == nil { 524 return srv.(S2Server).Set(ctx, in) 525 } 526 info := &grpc.UnaryServerInfo{ 527 Server: srv, 528 FullMethod: "/test.S2/Set", 529 } 530 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 531 return srv.(S2Server).Set(ctx, req.(*M1)) 532 } 533 return interceptor(ctx, in, info, handler) 534 } 535 536 func _S2_Imp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 537 in := new(sub.Sub) 538 if err := dec(in); err != nil { 539 return nil, err 540 } 541 if interceptor == nil { 542 return srv.(S2Server).Imp(ctx, in) 543 } 544 info := &grpc.UnaryServerInfo{ 545 Server: srv, 546 FullMethod: "/test.S2/Imp", 547 } 548 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 549 return srv.(S2Server).Imp(ctx, req.(*sub.Sub)) 550 } 551 return interceptor(ctx, in, info, handler) 552 } 553 554 var _S2_serviceDesc = grpc.ServiceDesc{ 555 ServiceName: "test.S2", 556 HandlerType: (*S2Server)(nil), 557 Methods: []grpc.MethodDesc{ 558 { 559 MethodName: "Get", 560 Handler: _S2_Get_Handler, 561 }, 562 { 563 MethodName: "Set", 564 Handler: _S2_Set_Handler, 565 }, 566 { 567 MethodName: "Imp", 568 Handler: _S2_Imp_Handler, 569 }, 570 }, 571 Streams: []grpc.StreamDesc{}, 572 Metadata: "go.chromium.org/luci/grpc/internal/svctool/testdata/test.proto", 573 }