+15
-15
@@ -25,7 +25,7 @@ const (
|
||||
CRM_GetProduct_FullMethodName = "/crabs.crm.CRM/GetProduct"
|
||||
CRM_GetBreadcrumbs_FullMethodName = "/crabs.crm.CRM/GetBreadcrumbs"
|
||||
CRM_Order_FullMethodName = "/crabs.crm.CRM/Order"
|
||||
CRM_GetCard_FullMethodName = "/crabs.crm.CRM/GetCard"
|
||||
CRM_GetCart_FullMethodName = "/crabs.crm.CRM/GetCart"
|
||||
CRM_GetImage_FullMethodName = "/crabs.crm.CRM/GetImage"
|
||||
)
|
||||
|
||||
@@ -38,7 +38,7 @@ type CRMClient interface {
|
||||
GetProduct(ctx context.Context, in *GetProductReq, opts ...grpc.CallOption) (*ProductRsp, error)
|
||||
GetBreadcrumbs(ctx context.Context, in *GetBreadcrumbsReq, opts ...grpc.CallOption) (*BreadcrumbsRsp, error)
|
||||
Order(ctx context.Context, in *OrderReq, opts ...grpc.CallOption) (*OrderRsp, error)
|
||||
GetCard(ctx context.Context, in *CardReq, opts ...grpc.CallOption) (*CardRsp, error)
|
||||
GetCart(ctx context.Context, in *CartReq, opts ...grpc.CallOption) (*CartRsp, error)
|
||||
GetImage(ctx context.Context, in *GetImageReq, opts ...grpc.CallOption) (*httpbody.HttpBody, error)
|
||||
}
|
||||
|
||||
@@ -95,9 +95,9 @@ func (c *cRMClient) Order(ctx context.Context, in *OrderReq, opts ...grpc.CallOp
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *cRMClient) GetCard(ctx context.Context, in *CardReq, opts ...grpc.CallOption) (*CardRsp, error) {
|
||||
out := new(CardRsp)
|
||||
err := c.cc.Invoke(ctx, CRM_GetCard_FullMethodName, in, out, opts...)
|
||||
func (c *cRMClient) GetCart(ctx context.Context, in *CartReq, opts ...grpc.CallOption) (*CartRsp, error) {
|
||||
out := new(CartRsp)
|
||||
err := c.cc.Invoke(ctx, CRM_GetCart_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -122,7 +122,7 @@ type CRMServer interface {
|
||||
GetProduct(context.Context, *GetProductReq) (*ProductRsp, error)
|
||||
GetBreadcrumbs(context.Context, *GetBreadcrumbsReq) (*BreadcrumbsRsp, error)
|
||||
Order(context.Context, *OrderReq) (*OrderRsp, error)
|
||||
GetCard(context.Context, *CardReq) (*CardRsp, error)
|
||||
GetCart(context.Context, *CartReq) (*CartRsp, error)
|
||||
GetImage(context.Context, *GetImageReq) (*httpbody.HttpBody, error)
|
||||
mustEmbedUnimplementedCRMServer()
|
||||
}
|
||||
@@ -146,8 +146,8 @@ func (UnimplementedCRMServer) GetBreadcrumbs(context.Context, *GetBreadcrumbsReq
|
||||
func (UnimplementedCRMServer) Order(context.Context, *OrderReq) (*OrderRsp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Order not implemented")
|
||||
}
|
||||
func (UnimplementedCRMServer) GetCard(context.Context, *CardReq) (*CardRsp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetCard not implemented")
|
||||
func (UnimplementedCRMServer) GetCart(context.Context, *CartReq) (*CartRsp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetCart not implemented")
|
||||
}
|
||||
func (UnimplementedCRMServer) GetImage(context.Context, *GetImageReq) (*httpbody.HttpBody, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetImage not implemented")
|
||||
@@ -255,20 +255,20 @@ func _CRM_Order_Handler(srv interface{}, ctx context.Context, dec func(interface
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _CRM_GetCard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CardReq)
|
||||
func _CRM_GetCart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CartReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(CRMServer).GetCard(ctx, in)
|
||||
return srv.(CRMServer).GetCart(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: CRM_GetCard_FullMethodName,
|
||||
FullMethod: CRM_GetCart_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(CRMServer).GetCard(ctx, req.(*CardReq))
|
||||
return srv.(CRMServer).GetCart(ctx, req.(*CartReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -319,8 +319,8 @@ var CRM_ServiceDesc = grpc.ServiceDesc{
|
||||
Handler: _CRM_Order_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetCard",
|
||||
Handler: _CRM_GetCard_Handler,
|
||||
MethodName: "GetCart",
|
||||
Handler: _CRM_GetCart_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetImage",
|
||||
|
||||
Reference in New Issue
Block a user