github.com/lzy4123/fabric@v2.1.1+incompatible/internal/pkg/comm/testpb/test.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: test.proto 3 4 package testpb 5 6 import ( 7 context "context" 8 fmt "fmt" 9 proto "github.com/golang/protobuf/proto" 10 grpc "google.golang.org/grpc" 11 math "math" 12 ) 13 14 // Reference imports to suppress errors if they are not otherwise used. 15 var _ = proto.Marshal 16 var _ = fmt.Errorf 17 var _ = math.Inf 18 19 // This is a compile-time assertion to ensure that this generated file 20 // is compatible with the proto package it is being compiled against. 21 // A compilation error at this line likely means your copy of the 22 // proto package needs to be updated. 23 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 24 25 type Empty struct { 26 XXX_NoUnkeyedLiteral struct{} `json:"-"` 27 XXX_unrecognized []byte `json:"-"` 28 XXX_sizecache int32 `json:"-"` 29 } 30 31 func (m *Empty) Reset() { *m = Empty{} } 32 func (m *Empty) String() string { return proto.CompactTextString(m) } 33 func (*Empty) ProtoMessage() {} 34 func (*Empty) Descriptor() ([]byte, []int) { 35 return fileDescriptor_c161fcfdc0c3ff1e, []int{0} 36 } 37 38 func (m *Empty) XXX_Unmarshal(b []byte) error { 39 return xxx_messageInfo_Empty.Unmarshal(m, b) 40 } 41 func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 42 return xxx_messageInfo_Empty.Marshal(b, m, deterministic) 43 } 44 func (m *Empty) XXX_Merge(src proto.Message) { 45 xxx_messageInfo_Empty.Merge(m, src) 46 } 47 func (m *Empty) XXX_Size() int { 48 return xxx_messageInfo_Empty.Size(m) 49 } 50 func (m *Empty) XXX_DiscardUnknown() { 51 xxx_messageInfo_Empty.DiscardUnknown(m) 52 } 53 54 var xxx_messageInfo_Empty proto.InternalMessageInfo 55 56 type Echo struct { 57 Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` 58 XXX_NoUnkeyedLiteral struct{} `json:"-"` 59 XXX_unrecognized []byte `json:"-"` 60 XXX_sizecache int32 `json:"-"` 61 } 62 63 func (m *Echo) Reset() { *m = Echo{} } 64 func (m *Echo) String() string { return proto.CompactTextString(m) } 65 func (*Echo) ProtoMessage() {} 66 func (*Echo) Descriptor() ([]byte, []int) { 67 return fileDescriptor_c161fcfdc0c3ff1e, []int{1} 68 } 69 70 func (m *Echo) XXX_Unmarshal(b []byte) error { 71 return xxx_messageInfo_Echo.Unmarshal(m, b) 72 } 73 func (m *Echo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 74 return xxx_messageInfo_Echo.Marshal(b, m, deterministic) 75 } 76 func (m *Echo) XXX_Merge(src proto.Message) { 77 xxx_messageInfo_Echo.Merge(m, src) 78 } 79 func (m *Echo) XXX_Size() int { 80 return xxx_messageInfo_Echo.Size(m) 81 } 82 func (m *Echo) XXX_DiscardUnknown() { 83 xxx_messageInfo_Echo.DiscardUnknown(m) 84 } 85 86 var xxx_messageInfo_Echo proto.InternalMessageInfo 87 88 func (m *Echo) GetPayload() []byte { 89 if m != nil { 90 return m.Payload 91 } 92 return nil 93 } 94 95 func init() { 96 proto.RegisterType((*Empty)(nil), "Empty") 97 proto.RegisterType((*Echo)(nil), "Echo") 98 } 99 100 func init() { proto.RegisterFile("test.proto", fileDescriptor_c161fcfdc0c3ff1e) } 101 102 var fileDescriptor_c161fcfdc0c3ff1e = []byte{ 103 // 203 bytes of a gzipped FileDescriptorProto 104 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0x31, 0x4f, 0x87, 0x30, 105 0x14, 0xc4, 0xd3, 0xc4, 0x3f, 0xe8, 0x83, 0xa9, 0x13, 0xc1, 0x05, 0x59, 0x24, 0x0e, 0x2d, 0xc1, 106 0x6f, 0xa0, 0x61, 0x75, 0x50, 0x27, 0xb7, 0xb6, 0x3c, 0x81, 0xa4, 0x4d, 0x9b, 0x52, 0x4d, 0xf8, 107 0xf6, 0xa6, 0x45, 0x16, 0x27, 0xa7, 0xfb, 0x5d, 0x7a, 0xbd, 0xbc, 0x1c, 0x40, 0xc0, 0x2d, 0x30, 108 0xe7, 0x6d, 0xb0, 0x6d, 0x0e, 0x97, 0xd1, 0xb8, 0xb0, 0xb7, 0x0d, 0x5c, 0x8d, 0x6a, 0xb1, 0xb4, 109 0x82, 0xdc, 0x89, 0x5d, 0x5b, 0x31, 0x55, 0xa4, 0x21, 0x5d, 0xf9, 0x7a, 0xda, 0xe1, 0x01, 0x8a, 110 0x77, 0xdc, 0xc2, 0x1b, 0xfa, 0xef, 0x55, 0x21, 0xbd, 0x85, 0x9b, 0xf4, 0xf3, 0x59, 0x68, 0x4d, 111 0x33, 0x96, 0xb8, 0xfe, 0xd5, 0xe1, 0x05, 0xca, 0x04, 0xff, 0x09, 0xd3, 0x3b, 0x28, 0x8e, 0x70, 112 0xf0, 0x28, 0xcc, 0xdf, 0xe7, 0x8e, 0xf4, 0x64, 0xb8, 0x87, 0x22, 0x5e, 0x77, 0xd6, 0x55, 0x70, 113 0x1d, 0x6d, 0x6a, 0xbb, 0xb0, 0x88, 0xf5, 0x21, 0x4f, 0xfd, 0x07, 0x9b, 0xd7, 0xb0, 0x7c, 0x49, 114 0xa6, 0xac, 0xe1, 0xcb, 0xee, 0xd0, 0x6b, 0x9c, 0x66, 0xf4, 0xfc, 0x53, 0x48, 0xbf, 0x2a, 0xae, 115 0xac, 0x47, 0xae, 0xac, 0x31, 0x3c, 0xae, 0xe0, 0xa4, 0xcc, 0xd2, 0x10, 0x8f, 0x3f, 0x01, 0x00, 116 0x00, 0xff, 0xff, 0x34, 0x99, 0xfa, 0xcc, 0x16, 0x01, 0x00, 0x00, 117 } 118 119 // Reference imports to suppress errors if they are not otherwise used. 120 var _ context.Context 121 var _ grpc.ClientConn 122 123 // This is a compile-time assertion to ensure that this generated file 124 // is compatible with the grpc package it is being compiled against. 125 const _ = grpc.SupportPackageIsVersion4 126 127 // TestServiceClient is the client API for TestService service. 128 // 129 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 130 type TestServiceClient interface { 131 EmptyCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) 132 } 133 134 type testServiceClient struct { 135 cc *grpc.ClientConn 136 } 137 138 func NewTestServiceClient(cc *grpc.ClientConn) TestServiceClient { 139 return &testServiceClient{cc} 140 } 141 142 func (c *testServiceClient) EmptyCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { 143 out := new(Empty) 144 err := c.cc.Invoke(ctx, "/TestService/EmptyCall", in, out, opts...) 145 if err != nil { 146 return nil, err 147 } 148 return out, nil 149 } 150 151 // TestServiceServer is the server API for TestService service. 152 type TestServiceServer interface { 153 EmptyCall(context.Context, *Empty) (*Empty, error) 154 } 155 156 func RegisterTestServiceServer(s *grpc.Server, srv TestServiceServer) { 157 s.RegisterService(&_TestService_serviceDesc, srv) 158 } 159 160 func _TestService_EmptyCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 161 in := new(Empty) 162 if err := dec(in); err != nil { 163 return nil, err 164 } 165 if interceptor == nil { 166 return srv.(TestServiceServer).EmptyCall(ctx, in) 167 } 168 info := &grpc.UnaryServerInfo{ 169 Server: srv, 170 FullMethod: "/TestService/EmptyCall", 171 } 172 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 173 return srv.(TestServiceServer).EmptyCall(ctx, req.(*Empty)) 174 } 175 return interceptor(ctx, in, info, handler) 176 } 177 178 var _TestService_serviceDesc = grpc.ServiceDesc{ 179 ServiceName: "TestService", 180 HandlerType: (*TestServiceServer)(nil), 181 Methods: []grpc.MethodDesc{ 182 { 183 MethodName: "EmptyCall", 184 Handler: _TestService_EmptyCall_Handler, 185 }, 186 }, 187 Streams: []grpc.StreamDesc{}, 188 Metadata: "test.proto", 189 } 190 191 // EmptyServiceClient is the client API for EmptyService service. 192 // 193 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 194 type EmptyServiceClient interface { 195 EmptyCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) 196 EmptyStream(ctx context.Context, opts ...grpc.CallOption) (EmptyService_EmptyStreamClient, error) 197 } 198 199 type emptyServiceClient struct { 200 cc *grpc.ClientConn 201 } 202 203 func NewEmptyServiceClient(cc *grpc.ClientConn) EmptyServiceClient { 204 return &emptyServiceClient{cc} 205 } 206 207 func (c *emptyServiceClient) EmptyCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { 208 out := new(Empty) 209 err := c.cc.Invoke(ctx, "/EmptyService/EmptyCall", in, out, opts...) 210 if err != nil { 211 return nil, err 212 } 213 return out, nil 214 } 215 216 func (c *emptyServiceClient) EmptyStream(ctx context.Context, opts ...grpc.CallOption) (EmptyService_EmptyStreamClient, error) { 217 stream, err := c.cc.NewStream(ctx, &_EmptyService_serviceDesc.Streams[0], "/EmptyService/EmptyStream", opts...) 218 if err != nil { 219 return nil, err 220 } 221 x := &emptyServiceEmptyStreamClient{stream} 222 return x, nil 223 } 224 225 type EmptyService_EmptyStreamClient interface { 226 Send(*Empty) error 227 Recv() (*Empty, error) 228 grpc.ClientStream 229 } 230 231 type emptyServiceEmptyStreamClient struct { 232 grpc.ClientStream 233 } 234 235 func (x *emptyServiceEmptyStreamClient) Send(m *Empty) error { 236 return x.ClientStream.SendMsg(m) 237 } 238 239 func (x *emptyServiceEmptyStreamClient) Recv() (*Empty, error) { 240 m := new(Empty) 241 if err := x.ClientStream.RecvMsg(m); err != nil { 242 return nil, err 243 } 244 return m, nil 245 } 246 247 // EmptyServiceServer is the server API for EmptyService service. 248 type EmptyServiceServer interface { 249 EmptyCall(context.Context, *Empty) (*Empty, error) 250 EmptyStream(EmptyService_EmptyStreamServer) error 251 } 252 253 func RegisterEmptyServiceServer(s *grpc.Server, srv EmptyServiceServer) { 254 s.RegisterService(&_EmptyService_serviceDesc, srv) 255 } 256 257 func _EmptyService_EmptyCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 258 in := new(Empty) 259 if err := dec(in); err != nil { 260 return nil, err 261 } 262 if interceptor == nil { 263 return srv.(EmptyServiceServer).EmptyCall(ctx, in) 264 } 265 info := &grpc.UnaryServerInfo{ 266 Server: srv, 267 FullMethod: "/EmptyService/EmptyCall", 268 } 269 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 270 return srv.(EmptyServiceServer).EmptyCall(ctx, req.(*Empty)) 271 } 272 return interceptor(ctx, in, info, handler) 273 } 274 275 func _EmptyService_EmptyStream_Handler(srv interface{}, stream grpc.ServerStream) error { 276 return srv.(EmptyServiceServer).EmptyStream(&emptyServiceEmptyStreamServer{stream}) 277 } 278 279 type EmptyService_EmptyStreamServer interface { 280 Send(*Empty) error 281 Recv() (*Empty, error) 282 grpc.ServerStream 283 } 284 285 type emptyServiceEmptyStreamServer struct { 286 grpc.ServerStream 287 } 288 289 func (x *emptyServiceEmptyStreamServer) Send(m *Empty) error { 290 return x.ServerStream.SendMsg(m) 291 } 292 293 func (x *emptyServiceEmptyStreamServer) Recv() (*Empty, error) { 294 m := new(Empty) 295 if err := x.ServerStream.RecvMsg(m); err != nil { 296 return nil, err 297 } 298 return m, nil 299 } 300 301 var _EmptyService_serviceDesc = grpc.ServiceDesc{ 302 ServiceName: "EmptyService", 303 HandlerType: (*EmptyServiceServer)(nil), 304 Methods: []grpc.MethodDesc{ 305 { 306 MethodName: "EmptyCall", 307 Handler: _EmptyService_EmptyCall_Handler, 308 }, 309 }, 310 Streams: []grpc.StreamDesc{ 311 { 312 StreamName: "EmptyStream", 313 Handler: _EmptyService_EmptyStream_Handler, 314 ServerStreams: true, 315 ClientStreams: true, 316 }, 317 }, 318 Metadata: "test.proto", 319 } 320 321 // EchoServiceClient is the client API for EchoService service. 322 // 323 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 324 type EchoServiceClient interface { 325 EchoCall(ctx context.Context, in *Echo, opts ...grpc.CallOption) (*Echo, error) 326 } 327 328 type echoServiceClient struct { 329 cc *grpc.ClientConn 330 } 331 332 func NewEchoServiceClient(cc *grpc.ClientConn) EchoServiceClient { 333 return &echoServiceClient{cc} 334 } 335 336 func (c *echoServiceClient) EchoCall(ctx context.Context, in *Echo, opts ...grpc.CallOption) (*Echo, error) { 337 out := new(Echo) 338 err := c.cc.Invoke(ctx, "/EchoService/EchoCall", in, out, opts...) 339 if err != nil { 340 return nil, err 341 } 342 return out, nil 343 } 344 345 // EchoServiceServer is the server API for EchoService service. 346 type EchoServiceServer interface { 347 EchoCall(context.Context, *Echo) (*Echo, error) 348 } 349 350 func RegisterEchoServiceServer(s *grpc.Server, srv EchoServiceServer) { 351 s.RegisterService(&_EchoService_serviceDesc, srv) 352 } 353 354 func _EchoService_EchoCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 355 in := new(Echo) 356 if err := dec(in); err != nil { 357 return nil, err 358 } 359 if interceptor == nil { 360 return srv.(EchoServiceServer).EchoCall(ctx, in) 361 } 362 info := &grpc.UnaryServerInfo{ 363 Server: srv, 364 FullMethod: "/EchoService/EchoCall", 365 } 366 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 367 return srv.(EchoServiceServer).EchoCall(ctx, req.(*Echo)) 368 } 369 return interceptor(ctx, in, info, handler) 370 } 371 372 var _EchoService_serviceDesc = grpc.ServiceDesc{ 373 ServiceName: "EchoService", 374 HandlerType: (*EchoServiceServer)(nil), 375 Methods: []grpc.MethodDesc{ 376 { 377 MethodName: "EchoCall", 378 Handler: _EchoService_EchoCall_Handler, 379 }, 380 }, 381 Streams: []grpc.StreamDesc{}, 382 Metadata: "test.proto", 383 }