| | |
| | | type ProductServiceClient interface { |
| | | GetProductInfo(ctx context.Context, in *GetProductInfoRequest, opts ...grpc.CallOption) (*GetProductInfoResponse, error) |
| | | GetProductList(ctx context.Context, in *GetProductListRequest, opts ...grpc.CallOption) (*GetProductListResponse, error) |
| | | GetProductOrder(ctx context.Context, in *GetProductOrderRequest, opts ...grpc.CallOption) (*GetProductOrderResponse, error) |
| | | } |
| | | |
| | | type productServiceClient struct { |
| | |
| | | return out, nil |
| | | } |
| | | |
| | | func (c *productServiceClient) GetProductOrder(ctx context.Context, in *GetProductOrderRequest, opts ...grpc.CallOption) (*GetProductOrderResponse, error) { |
| | | out := new(GetProductOrderResponse) |
| | | err := c.cc.Invoke(ctx, "/productService/GetProductOrder", in, out, opts...) |
| | | if err != nil { |
| | | return nil, err |
| | | } |
| | | return out, nil |
| | | } |
| | | |
| | | // ProductServiceServer is the server API for ProductService service. |
| | | // All implementations must embed UnimplementedProductServiceServer |
| | | // for forward compatibility |
| | | type ProductServiceServer interface { |
| | | GetProductInfo(context.Context, *GetProductInfoRequest) (*GetProductInfoResponse, error) |
| | | GetProductList(context.Context, *GetProductListRequest) (*GetProductListResponse, error) |
| | | GetProductOrder(context.Context, *GetProductOrderRequest) (*GetProductOrderResponse, error) |
| | | mustEmbedUnimplementedProductServiceServer() |
| | | } |
| | | |
| | |
| | | } |
| | | func (UnimplementedProductServiceServer) GetProductList(context.Context, *GetProductListRequest) (*GetProductListResponse, error) { |
| | | return nil, status.Errorf(codes.Unimplemented, "method GetProductList not implemented") |
| | | } |
| | | func (UnimplementedProductServiceServer) GetProductOrder(context.Context, *GetProductOrderRequest) (*GetProductOrderResponse, error) { |
| | | return nil, status.Errorf(codes.Unimplemented, "method GetProductOrder not implemented") |
| | | } |
| | | func (UnimplementedProductServiceServer) mustEmbedUnimplementedProductServiceServer() {} |
| | | |
| | |
| | | return interceptor(ctx, in, info, handler) |
| | | } |
| | | |
| | | func _ProductService_GetProductOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| | | in := new(GetProductOrderRequest) |
| | | if err := dec(in); err != nil { |
| | | return nil, err |
| | | } |
| | | if interceptor == nil { |
| | | return srv.(ProductServiceServer).GetProductOrder(ctx, in) |
| | | } |
| | | info := &grpc.UnaryServerInfo{ |
| | | Server: srv, |
| | | FullMethod: "/productService/GetProductOrder", |
| | | } |
| | | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| | | return srv.(ProductServiceServer).GetProductOrder(ctx, req.(*GetProductOrderRequest)) |
| | | } |
| | | return interceptor(ctx, in, info, handler) |
| | | } |
| | | |
| | | // ProductService_ServiceDesc is the grpc.ServiceDesc for ProductService service. |
| | | // It's only intended for direct use with grpc.RegisterService, |
| | | // and not to be introspected or modified (even as a copy) |
| | |
| | | MethodName: "GetProductList", |
| | | Handler: _ProductService_GetProductList_Handler, |
| | | }, |
| | | { |
| | | MethodName: "GetProductOrder", |
| | | Handler: _ProductService_GetProductOrder_Handler, |
| | | }, |
| | | }, |
| | | Streams: []grpc.StreamDesc{}, |
| | | Metadata: "product.proto", |