zhangqian
2024-03-18 f89ebee0ac754d330f4cb6d51c2b461833131d5d
proto/product/product_grpc.pb.go
@@ -1,8 +1,4 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             v3.19.0
// source: product.proto
package product
@@ -18,17 +14,13 @@
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
   ProductService_GetProductInfo_FullMethodName = "/productService/GetProductInfo"
   ProductService_GetProductList_FullMethodName = "/productService/GetProductList"
)
// ProductServiceClient is the client API for ProductService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
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 {
@@ -41,7 +33,7 @@
func (c *productServiceClient) GetProductInfo(ctx context.Context, in *GetProductInfoRequest, opts ...grpc.CallOption) (*GetProductInfoResponse, error) {
   out := new(GetProductInfoResponse)
   err := c.cc.Invoke(ctx, ProductService_GetProductInfo_FullMethodName, in, out, opts...)
   err := c.cc.Invoke(ctx, "/productService/GetProductInfo", in, out, opts...)
   if err != nil {
      return nil, err
   }
@@ -50,7 +42,16 @@
func (c *productServiceClient) GetProductList(ctx context.Context, in *GetProductListRequest, opts ...grpc.CallOption) (*GetProductListResponse, error) {
   out := new(GetProductListResponse)
   err := c.cc.Invoke(ctx, ProductService_GetProductList_FullMethodName, in, out, opts...)
   err := c.cc.Invoke(ctx, "/productService/GetProductList", in, out, opts...)
   if err != nil {
      return nil, err
   }
   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
   }
@@ -63,6 +64,7 @@
type ProductServiceServer interface {
   GetProductInfo(context.Context, *GetProductInfoRequest) (*GetProductInfoResponse, error)
   GetProductList(context.Context, *GetProductListRequest) (*GetProductListResponse, error)
   GetProductOrder(context.Context, *GetProductOrderRequest) (*GetProductOrderResponse, error)
   mustEmbedUnimplementedProductServiceServer()
}
@@ -75,6 +77,9 @@
}
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() {}
@@ -99,7 +104,7 @@
   }
   info := &grpc.UnaryServerInfo{
      Server:     srv,
      FullMethod: ProductService_GetProductInfo_FullMethodName,
      FullMethod: "/productService/GetProductInfo",
   }
   handler := func(ctx context.Context, req interface{}) (interface{}, error) {
      return srv.(ProductServiceServer).GetProductInfo(ctx, req.(*GetProductInfoRequest))
@@ -117,10 +122,28 @@
   }
   info := &grpc.UnaryServerInfo{
      Server:     srv,
      FullMethod: ProductService_GetProductList_FullMethodName,
      FullMethod: "/productService/GetProductList",
   }
   handler := func(ctx context.Context, req interface{}) (interface{}, error) {
      return srv.(ProductServiceServer).GetProductList(ctx, req.(*GetProductListRequest))
   }
   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)
}
@@ -140,6 +163,10 @@
         MethodName: "GetProductList",
         Handler:    _ProductService_GetProductList_Handler,
      },
      {
         MethodName: "GetProductOrder",
         Handler:    _ProductService_GetProductOrder_Handler,
      },
   },
   Streams:  []grpc.StreamDesc{},
   Metadata: "product.proto",