github.com/annwntech/go-micro/v2@v2.9.5/server/grpc/proto/test.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.25.0 4 // protoc v3.13.0 5 // source: server/grpc/proto/test.proto 6 7 package test 8 9 import ( 10 context "context" 11 proto "github.com/golang/protobuf/proto" 12 _ "google.golang.org/genproto/googleapis/api/annotations" 13 grpc "google.golang.org/grpc" 14 codes "google.golang.org/grpc/codes" 15 status "google.golang.org/grpc/status" 16 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 17 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 18 reflect "reflect" 19 sync "sync" 20 ) 21 22 const ( 23 // Verify that this generated code is sufficiently up-to-date. 24 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 25 // Verify that runtime/protoimpl is sufficiently up-to-date. 26 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 27 ) 28 29 // This is a compile-time assertion that a sufficiently up-to-date version 30 // of the legacy proto package is being used. 31 const _ = proto.ProtoPackageIsVersion4 32 33 type Request struct { 34 state protoimpl.MessageState 35 sizeCache protoimpl.SizeCache 36 unknownFields protoimpl.UnknownFields 37 38 Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` 39 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` 40 } 41 42 func (x *Request) Reset() { 43 *x = Request{} 44 if protoimpl.UnsafeEnabled { 45 mi := &file_server_grpc_proto_test_proto_msgTypes[0] 46 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 47 ms.StoreMessageInfo(mi) 48 } 49 } 50 51 func (x *Request) String() string { 52 return protoimpl.X.MessageStringOf(x) 53 } 54 55 func (*Request) ProtoMessage() {} 56 57 func (x *Request) ProtoReflect() protoreflect.Message { 58 mi := &file_server_grpc_proto_test_proto_msgTypes[0] 59 if protoimpl.UnsafeEnabled && x != nil { 60 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 61 if ms.LoadMessageInfo() == nil { 62 ms.StoreMessageInfo(mi) 63 } 64 return ms 65 } 66 return mi.MessageOf(x) 67 } 68 69 // Deprecated: Use Request.ProtoReflect.Descriptor instead. 70 func (*Request) Descriptor() ([]byte, []int) { 71 return file_server_grpc_proto_test_proto_rawDescGZIP(), []int{0} 72 } 73 74 func (x *Request) GetUuid() string { 75 if x != nil { 76 return x.Uuid 77 } 78 return "" 79 } 80 81 func (x *Request) GetName() string { 82 if x != nil { 83 return x.Name 84 } 85 return "" 86 } 87 88 type Response struct { 89 state protoimpl.MessageState 90 sizeCache protoimpl.SizeCache 91 unknownFields protoimpl.UnknownFields 92 93 Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` 94 } 95 96 func (x *Response) Reset() { 97 *x = Response{} 98 if protoimpl.UnsafeEnabled { 99 mi := &file_server_grpc_proto_test_proto_msgTypes[1] 100 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 101 ms.StoreMessageInfo(mi) 102 } 103 } 104 105 func (x *Response) String() string { 106 return protoimpl.X.MessageStringOf(x) 107 } 108 109 func (*Response) ProtoMessage() {} 110 111 func (x *Response) ProtoReflect() protoreflect.Message { 112 mi := &file_server_grpc_proto_test_proto_msgTypes[1] 113 if protoimpl.UnsafeEnabled && x != nil { 114 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 115 if ms.LoadMessageInfo() == nil { 116 ms.StoreMessageInfo(mi) 117 } 118 return ms 119 } 120 return mi.MessageOf(x) 121 } 122 123 // Deprecated: Use Response.ProtoReflect.Descriptor instead. 124 func (*Response) Descriptor() ([]byte, []int) { 125 return file_server_grpc_proto_test_proto_rawDescGZIP(), []int{1} 126 } 127 128 func (x *Response) GetMsg() string { 129 if x != nil { 130 return x.Msg 131 } 132 return "" 133 } 134 135 var File_server_grpc_proto_test_proto protoreflect.FileDescriptor 136 137 var file_server_grpc_proto_test_proto_rawDesc = []byte{ 138 0x0a, 0x1c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, 139 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 140 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 141 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x31, 0x0a, 0x07, 142 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 143 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 144 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 145 0x1c, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 146 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x32, 0xe6, 0x01, 147 0x0a, 0x04, 0x54, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x08, 148 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 149 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x18, 0x2f, 0x61, 0x70, 150 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x2f, 0x7b, 151 0x75, 0x75, 0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0x46, 0x0a, 0x08, 0x43, 0x61, 0x6c, 0x6c, 152 0x50, 0x63, 0x72, 0x65, 0x12, 0x08, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, 153 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 154 0x1f, 0x22, 0x1a, 0x5e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x74, 0x65, 0x73, 0x74, 155 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x2f, 0x70, 0x63, 0x72, 0x65, 0x2f, 0x3f, 0x24, 0x3a, 0x01, 0x2a, 156 0x12, 0x54, 0x0a, 0x0f, 0x43, 0x61, 0x6c, 0x6c, 0x50, 0x63, 0x72, 0x65, 0x49, 0x6e, 0x76, 0x61, 157 0x6c, 0x69, 0x64, 0x12, 0x08, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, 0x2e, 158 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 159 0x22, 0x21, 0x5e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 160 0x63, 0x61, 0x6c, 0x6c, 0x2f, 0x70, 0x63, 0x72, 0x65, 0x2f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 161 0x64, 0x2f, 0x3f, 0x3a, 0x01, 0x2a, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 162 } 163 164 var ( 165 file_server_grpc_proto_test_proto_rawDescOnce sync.Once 166 file_server_grpc_proto_test_proto_rawDescData = file_server_grpc_proto_test_proto_rawDesc 167 ) 168 169 func file_server_grpc_proto_test_proto_rawDescGZIP() []byte { 170 file_server_grpc_proto_test_proto_rawDescOnce.Do(func() { 171 file_server_grpc_proto_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_server_grpc_proto_test_proto_rawDescData) 172 }) 173 return file_server_grpc_proto_test_proto_rawDescData 174 } 175 176 var file_server_grpc_proto_test_proto_msgTypes = make([]protoimpl.MessageInfo, 2) 177 var file_server_grpc_proto_test_proto_goTypes = []interface{}{ 178 (*Request)(nil), // 0: Request 179 (*Response)(nil), // 1: Response 180 } 181 var file_server_grpc_proto_test_proto_depIdxs = []int32{ 182 0, // 0: Test.Call:input_type -> Request 183 0, // 1: Test.CallPcre:input_type -> Request 184 0, // 2: Test.CallPcreInvalid:input_type -> Request 185 1, // 3: Test.Call:output_type -> Response 186 1, // 4: Test.CallPcre:output_type -> Response 187 1, // 5: Test.CallPcreInvalid:output_type -> Response 188 3, // [3:6] is the sub-list for method output_type 189 0, // [0:3] is the sub-list for method input_type 190 0, // [0:0] is the sub-list for extension type_name 191 0, // [0:0] is the sub-list for extension extendee 192 0, // [0:0] is the sub-list for field type_name 193 } 194 195 func init() { file_server_grpc_proto_test_proto_init() } 196 func file_server_grpc_proto_test_proto_init() { 197 if File_server_grpc_proto_test_proto != nil { 198 return 199 } 200 if !protoimpl.UnsafeEnabled { 201 file_server_grpc_proto_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 202 switch v := v.(*Request); i { 203 case 0: 204 return &v.state 205 case 1: 206 return &v.sizeCache 207 case 2: 208 return &v.unknownFields 209 default: 210 return nil 211 } 212 } 213 file_server_grpc_proto_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 214 switch v := v.(*Response); i { 215 case 0: 216 return &v.state 217 case 1: 218 return &v.sizeCache 219 case 2: 220 return &v.unknownFields 221 default: 222 return nil 223 } 224 } 225 } 226 type x struct{} 227 out := protoimpl.TypeBuilder{ 228 File: protoimpl.DescBuilder{ 229 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 230 RawDescriptor: file_server_grpc_proto_test_proto_rawDesc, 231 NumEnums: 0, 232 NumMessages: 2, 233 NumExtensions: 0, 234 NumServices: 1, 235 }, 236 GoTypes: file_server_grpc_proto_test_proto_goTypes, 237 DependencyIndexes: file_server_grpc_proto_test_proto_depIdxs, 238 MessageInfos: file_server_grpc_proto_test_proto_msgTypes, 239 }.Build() 240 File_server_grpc_proto_test_proto = out.File 241 file_server_grpc_proto_test_proto_rawDesc = nil 242 file_server_grpc_proto_test_proto_goTypes = nil 243 file_server_grpc_proto_test_proto_depIdxs = nil 244 } 245 246 // Reference imports to suppress errors if they are not otherwise used. 247 var _ context.Context 248 var _ grpc.ClientConnInterface 249 250 // This is a compile-time assertion to ensure that this generated file 251 // is compatible with the grpc package it is being compiled against. 252 const _ = grpc.SupportPackageIsVersion6 253 254 // TestClient is the client API for Test service. 255 // 256 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 257 type TestClient interface { 258 Call(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) 259 CallPcre(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) 260 CallPcreInvalid(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) 261 } 262 263 type testClient struct { 264 cc grpc.ClientConnInterface 265 } 266 267 func NewTestClient(cc grpc.ClientConnInterface) TestClient { 268 return &testClient{cc} 269 } 270 271 func (c *testClient) Call(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { 272 out := new(Response) 273 err := c.cc.Invoke(ctx, "/Test/Call", in, out, opts...) 274 if err != nil { 275 return nil, err 276 } 277 return out, nil 278 } 279 280 func (c *testClient) CallPcre(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { 281 out := new(Response) 282 err := c.cc.Invoke(ctx, "/Test/CallPcre", in, out, opts...) 283 if err != nil { 284 return nil, err 285 } 286 return out, nil 287 } 288 289 func (c *testClient) CallPcreInvalid(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { 290 out := new(Response) 291 err := c.cc.Invoke(ctx, "/Test/CallPcreInvalid", in, out, opts...) 292 if err != nil { 293 return nil, err 294 } 295 return out, nil 296 } 297 298 // TestServer is the server API for Test service. 299 type TestServer interface { 300 Call(context.Context, *Request) (*Response, error) 301 CallPcre(context.Context, *Request) (*Response, error) 302 CallPcreInvalid(context.Context, *Request) (*Response, error) 303 } 304 305 // UnimplementedTestServer can be embedded to have forward compatible implementations. 306 type UnimplementedTestServer struct { 307 } 308 309 func (*UnimplementedTestServer) Call(context.Context, *Request) (*Response, error) { 310 return nil, status.Errorf(codes.Unimplemented, "method Call not implemented") 311 } 312 func (*UnimplementedTestServer) CallPcre(context.Context, *Request) (*Response, error) { 313 return nil, status.Errorf(codes.Unimplemented, "method CallPcre not implemented") 314 } 315 func (*UnimplementedTestServer) CallPcreInvalid(context.Context, *Request) (*Response, error) { 316 return nil, status.Errorf(codes.Unimplemented, "method CallPcreInvalid not implemented") 317 } 318 319 func RegisterTestServer(s *grpc.Server, srv TestServer) { 320 s.RegisterService(&_Test_serviceDesc, srv) 321 } 322 323 func _Test_Call_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 324 in := new(Request) 325 if err := dec(in); err != nil { 326 return nil, err 327 } 328 if interceptor == nil { 329 return srv.(TestServer).Call(ctx, in) 330 } 331 info := &grpc.UnaryServerInfo{ 332 Server: srv, 333 FullMethod: "/Test/Call", 334 } 335 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 336 return srv.(TestServer).Call(ctx, req.(*Request)) 337 } 338 return interceptor(ctx, in, info, handler) 339 } 340 341 func _Test_CallPcre_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 342 in := new(Request) 343 if err := dec(in); err != nil { 344 return nil, err 345 } 346 if interceptor == nil { 347 return srv.(TestServer).CallPcre(ctx, in) 348 } 349 info := &grpc.UnaryServerInfo{ 350 Server: srv, 351 FullMethod: "/Test/CallPcre", 352 } 353 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 354 return srv.(TestServer).CallPcre(ctx, req.(*Request)) 355 } 356 return interceptor(ctx, in, info, handler) 357 } 358 359 func _Test_CallPcreInvalid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 360 in := new(Request) 361 if err := dec(in); err != nil { 362 return nil, err 363 } 364 if interceptor == nil { 365 return srv.(TestServer).CallPcreInvalid(ctx, in) 366 } 367 info := &grpc.UnaryServerInfo{ 368 Server: srv, 369 FullMethod: "/Test/CallPcreInvalid", 370 } 371 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 372 return srv.(TestServer).CallPcreInvalid(ctx, req.(*Request)) 373 } 374 return interceptor(ctx, in, info, handler) 375 } 376 377 var _Test_serviceDesc = grpc.ServiceDesc{ 378 ServiceName: "Test", 379 HandlerType: (*TestServer)(nil), 380 Methods: []grpc.MethodDesc{ 381 { 382 MethodName: "Call", 383 Handler: _Test_Call_Handler, 384 }, 385 { 386 MethodName: "CallPcre", 387 Handler: _Test_CallPcre_Handler, 388 }, 389 { 390 MethodName: "CallPcreInvalid", 391 Handler: _Test_CallPcreInvalid_Handler, 392 }, 393 }, 394 Streams: []grpc.StreamDesc{}, 395 Metadata: "server/grpc/proto/test.proto", 396 }