// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // source: purchase.proto package pb import ( "context" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) // PurchaseServiceClient is the client API for PurchaseService service. type PurchaseServiceClient interface { CreateSupplier(ctx context.Context, in *CreateSupplierReq, opts ...grpc.CallOption) (*IdResp, error) UpdateSupplier(ctx context.Context, in *UpdateSupplierReq, opts ...grpc.CallOption) (*Empty, error) DeleteSupplier(ctx context.Context, in *DeleteSupplierReq, opts ...grpc.CallOption) (*Empty, error) GetSupplier(ctx context.Context, in *GetSupplierReq, opts ...grpc.CallOption) (*SupplierInfo, error) ListSupplier(ctx context.Context, in *ListSupplierReq, opts ...grpc.CallOption) (*ListSupplierResp, error) CreatePurchaseOrder(ctx context.Context, in *CreatePurchaseOrderReq, opts ...grpc.CallOption) (*IdResp, error) UpdatePurchaseOrder(ctx context.Context, in *UpdatePurchaseOrderReq, opts ...grpc.CallOption) (*Empty, error) ConfirmPurchaseOrder(ctx context.Context, in *ConfirmPurchaseOrderReq, opts ...grpc.CallOption) (*Empty, error) CancelPurchaseOrder(ctx context.Context, in *CancelPurchaseOrderReq, opts ...grpc.CallOption) (*Empty, error) GetPurchaseOrder(ctx context.Context, in *GetPurchaseOrderReq, opts ...grpc.CallOption) (*PurchaseOrderInfo, error) ListPurchaseOrder(ctx context.Context, in *ListPurchaseOrderReq, opts ...grpc.CallOption) (*ListPurchaseOrderResp, error) CreatePurchaseReceipt(ctx context.Context, in *CreatePurchaseReceiptReq, opts ...grpc.CallOption) (*IdResp, error) ConfirmPurchaseReceipt(ctx context.Context, in *ConfirmPurchaseReceiptReq, opts ...grpc.CallOption) (*Empty, error) GetPurchaseReceipt(ctx context.Context, in *GetPurchaseReceiptReq, opts ...grpc.CallOption) (*PurchaseReceiptInfo, error) ListPurchaseReceipt(ctx context.Context, in *ListPurchaseReceiptReq, opts ...grpc.CallOption) (*ListPurchaseReceiptResp, error) CreatePurchasePayment(ctx context.Context, in *CreatePurchasePaymentReq, opts ...grpc.CallOption) (*IdResp, error) ListPurchasePayment(ctx context.Context, in *ListPurchasePaymentReq, opts ...grpc.CallOption) (*ListPurchasePaymentResp, error) ListInventoryLog(ctx context.Context, in *ListInventoryLogReq, opts ...grpc.CallOption) (*ListInventoryLogResp, error) GetPurchaseStatsSummary(ctx context.Context, in *PurchaseStatsSummaryReq, opts ...grpc.CallOption) (*PurchaseStatsSummaryResp, error) GetPurchaseStatsBySupplier(ctx context.Context, in *PurchaseStatsSummaryReq, opts ...grpc.CallOption) (*PurchaseStatsBySupplierResp, error) GetPurchaseStatsByProduct(ctx context.Context, in *PurchaseStatsSummaryReq, opts ...grpc.CallOption) (*PurchaseStatsByProductResp, error) } type purchaseServiceClient struct { cc grpc.ClientConnInterface } func NewPurchaseServiceClient(cc grpc.ClientConnInterface) PurchaseServiceClient { return &purchaseServiceClient{cc} } func (c *purchaseServiceClient) CreateSupplier(ctx context.Context, in *CreateSupplierReq, opts ...grpc.CallOption) (*IdResp, error) { out := new(IdResp) err := c.cc.Invoke(ctx, "/purchase.PurchaseService/CreateSupplier", in, out, opts...) return out, err } func (c *purchaseServiceClient) UpdateSupplier(ctx context.Context, in *UpdateSupplierReq, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) err := c.cc.Invoke(ctx, "/purchase.PurchaseService/UpdateSupplier", in, out, opts...) return out, err } func (c *purchaseServiceClient) DeleteSupplier(ctx context.Context, in *DeleteSupplierReq, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) err := c.cc.Invoke(ctx, "/purchase.PurchaseService/DeleteSupplier", in, out, opts...) return out, err } func (c *purchaseServiceClient) GetSupplier(ctx context.Context, in *GetSupplierReq, opts ...grpc.CallOption) (*SupplierInfo, error) { out := new(SupplierInfo) err := c.cc.Invoke(ctx, "/purchase.PurchaseService/GetSupplier", in, out, opts...) return out, err } func (c *purchaseServiceClient) ListSupplier(ctx context.Context, in *ListSupplierReq, opts ...grpc.CallOption) (*ListSupplierResp, error) { out := new(ListSupplierResp) err := c.cc.Invoke(ctx, "/purchase.PurchaseService/ListSupplier", in, out, opts...) return out, err } func (c *purchaseServiceClient) CreatePurchaseOrder(ctx context.Context, in *CreatePurchaseOrderReq, opts ...grpc.CallOption) (*IdResp, error) { out := new(IdResp) err := c.cc.Invoke(ctx, "/purchase.PurchaseService/CreatePurchaseOrder", in, out, opts...) return out, err } func (c *purchaseServiceClient) UpdatePurchaseOrder(ctx context.Context, in *UpdatePurchaseOrderReq, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) err := c.cc.Invoke(ctx, "/purchase.PurchaseService/UpdatePurchaseOrder", in, out, opts...) return out, err } func (c *purchaseServiceClient) ConfirmPurchaseOrder(ctx context.Context, in *ConfirmPurchaseOrderReq, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) err := c.cc.Invoke(ctx, "/purchase.PurchaseService/ConfirmPurchaseOrder", in, out, opts...) return out, err } func (c *purchaseServiceClient) CancelPurchaseOrder(ctx context.Context, in *CancelPurchaseOrderReq, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) err := c.cc.Invoke(ctx, "/purchase.PurchaseService/CancelPurchaseOrder", in, out, opts...) return out, err } func (c *purchaseServiceClient) GetPurchaseOrder(ctx context.Context, in *GetPurchaseOrderReq, opts ...grpc.CallOption) (*PurchaseOrderInfo, error) { out := new(PurchaseOrderInfo) err := c.cc.Invoke(ctx, "/purchase.PurchaseService/GetPurchaseOrder", in, out, opts...) return out, err } func (c *purchaseServiceClient) ListPurchaseOrder(ctx context.Context, in *ListPurchaseOrderReq, opts ...grpc.CallOption) (*ListPurchaseOrderResp, error) { out := new(ListPurchaseOrderResp) err := c.cc.Invoke(ctx, "/purchase.PurchaseService/ListPurchaseOrder", in, out, opts...) return out, err } func (c *purchaseServiceClient) CreatePurchaseReceipt(ctx context.Context, in *CreatePurchaseReceiptReq, opts ...grpc.CallOption) (*IdResp, error) { out := new(IdResp) err := c.cc.Invoke(ctx, "/purchase.PurchaseService/CreatePurchaseReceipt", in, out, opts...) return out, err } func (c *purchaseServiceClient) ConfirmPurchaseReceipt(ctx context.Context, in *ConfirmPurchaseReceiptReq, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) err := c.cc.Invoke(ctx, "/purchase.PurchaseService/ConfirmPurchaseReceipt", in, out, opts...) return out, err } func (c *purchaseServiceClient) GetPurchaseReceipt(ctx context.Context, in *GetPurchaseReceiptReq, opts ...grpc.CallOption) (*PurchaseReceiptInfo, error) { out := new(PurchaseReceiptInfo) err := c.cc.Invoke(ctx, "/purchase.PurchaseService/GetPurchaseReceipt", in, out, opts...) return out, err } func (c *purchaseServiceClient) ListPurchaseReceipt(ctx context.Context, in *ListPurchaseReceiptReq, opts ...grpc.CallOption) (*ListPurchaseReceiptResp, error) { out := new(ListPurchaseReceiptResp) err := c.cc.Invoke(ctx, "/purchase.PurchaseService/ListPurchaseReceipt", in, out, opts...) return out, err } func (c *purchaseServiceClient) CreatePurchasePayment(ctx context.Context, in *CreatePurchasePaymentReq, opts ...grpc.CallOption) (*IdResp, error) { out := new(IdResp) err := c.cc.Invoke(ctx, "/purchase.PurchaseService/CreatePurchasePayment", in, out, opts...) return out, err } func (c *purchaseServiceClient) ListPurchasePayment(ctx context.Context, in *ListPurchasePaymentReq, opts ...grpc.CallOption) (*ListPurchasePaymentResp, error) { out := new(ListPurchasePaymentResp) err := c.cc.Invoke(ctx, "/purchase.PurchaseService/ListPurchasePayment", in, out, opts...) return out, err } func (c *purchaseServiceClient) ListInventoryLog(ctx context.Context, in *ListInventoryLogReq, opts ...grpc.CallOption) (*ListInventoryLogResp, error) { out := new(ListInventoryLogResp) err := c.cc.Invoke(ctx, "/purchase.PurchaseService/ListInventoryLog", in, out, opts...) return out, err } func (c *purchaseServiceClient) GetPurchaseStatsSummary(ctx context.Context, in *PurchaseStatsSummaryReq, opts ...grpc.CallOption) (*PurchaseStatsSummaryResp, error) { out := new(PurchaseStatsSummaryResp) err := c.cc.Invoke(ctx, "/purchase.PurchaseService/GetPurchaseStatsSummary", in, out, opts...) return out, err } func (c *purchaseServiceClient) GetPurchaseStatsBySupplier(ctx context.Context, in *PurchaseStatsSummaryReq, opts ...grpc.CallOption) (*PurchaseStatsBySupplierResp, error) { out := new(PurchaseStatsBySupplierResp) err := c.cc.Invoke(ctx, "/purchase.PurchaseService/GetPurchaseStatsBySupplier", in, out, opts...) return out, err } func (c *purchaseServiceClient) GetPurchaseStatsByProduct(ctx context.Context, in *PurchaseStatsSummaryReq, opts ...grpc.CallOption) (*PurchaseStatsByProductResp, error) { out := new(PurchaseStatsByProductResp) err := c.cc.Invoke(ctx, "/purchase.PurchaseService/GetPurchaseStatsByProduct", in, out, opts...) return out, err } // PurchaseServiceServer is the server API for PurchaseService service. type PurchaseServiceServer interface { CreateSupplier(context.Context, *CreateSupplierReq) (*IdResp, error) UpdateSupplier(context.Context, *UpdateSupplierReq) (*Empty, error) DeleteSupplier(context.Context, *DeleteSupplierReq) (*Empty, error) GetSupplier(context.Context, *GetSupplierReq) (*SupplierInfo, error) ListSupplier(context.Context, *ListSupplierReq) (*ListSupplierResp, error) CreatePurchaseOrder(context.Context, *CreatePurchaseOrderReq) (*IdResp, error) UpdatePurchaseOrder(context.Context, *UpdatePurchaseOrderReq) (*Empty, error) ConfirmPurchaseOrder(context.Context, *ConfirmPurchaseOrderReq) (*Empty, error) CancelPurchaseOrder(context.Context, *CancelPurchaseOrderReq) (*Empty, error) GetPurchaseOrder(context.Context, *GetPurchaseOrderReq) (*PurchaseOrderInfo, error) ListPurchaseOrder(context.Context, *ListPurchaseOrderReq) (*ListPurchaseOrderResp, error) CreatePurchaseReceipt(context.Context, *CreatePurchaseReceiptReq) (*IdResp, error) ConfirmPurchaseReceipt(context.Context, *ConfirmPurchaseReceiptReq) (*Empty, error) GetPurchaseReceipt(context.Context, *GetPurchaseReceiptReq) (*PurchaseReceiptInfo, error) ListPurchaseReceipt(context.Context, *ListPurchaseReceiptReq) (*ListPurchaseReceiptResp, error) CreatePurchasePayment(context.Context, *CreatePurchasePaymentReq) (*IdResp, error) ListPurchasePayment(context.Context, *ListPurchasePaymentReq) (*ListPurchasePaymentResp, error) ListInventoryLog(context.Context, *ListInventoryLogReq) (*ListInventoryLogResp, error) GetPurchaseStatsSummary(context.Context, *PurchaseStatsSummaryReq) (*PurchaseStatsSummaryResp, error) GetPurchaseStatsBySupplier(context.Context, *PurchaseStatsSummaryReq) (*PurchaseStatsBySupplierResp, error) GetPurchaseStatsByProduct(context.Context, *PurchaseStatsSummaryReq) (*PurchaseStatsByProductResp, error) mustEmbedUnimplementedPurchaseServiceServer() } type UnimplementedPurchaseServiceServer struct{} func (UnimplementedPurchaseServiceServer) CreateSupplier(context.Context, *CreateSupplierReq) (*IdResp, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateSupplier not implemented") } func (UnimplementedPurchaseServiceServer) UpdateSupplier(context.Context, *UpdateSupplierReq) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateSupplier not implemented") } func (UnimplementedPurchaseServiceServer) DeleteSupplier(context.Context, *DeleteSupplierReq) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteSupplier not implemented") } func (UnimplementedPurchaseServiceServer) GetSupplier(context.Context, *GetSupplierReq) (*SupplierInfo, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSupplier not implemented") } func (UnimplementedPurchaseServiceServer) ListSupplier(context.Context, *ListSupplierReq) (*ListSupplierResp, error) { return nil, status.Errorf(codes.Unimplemented, "method ListSupplier not implemented") } func (UnimplementedPurchaseServiceServer) CreatePurchaseOrder(context.Context, *CreatePurchaseOrderReq) (*IdResp, error) { return nil, status.Errorf(codes.Unimplemented, "method CreatePurchaseOrder not implemented") } func (UnimplementedPurchaseServiceServer) UpdatePurchaseOrder(context.Context, *UpdatePurchaseOrderReq) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdatePurchaseOrder not implemented") } func (UnimplementedPurchaseServiceServer) ConfirmPurchaseOrder(context.Context, *ConfirmPurchaseOrderReq) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method ConfirmPurchaseOrder not implemented") } func (UnimplementedPurchaseServiceServer) CancelPurchaseOrder(context.Context, *CancelPurchaseOrderReq) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method CancelPurchaseOrder not implemented") } func (UnimplementedPurchaseServiceServer) GetPurchaseOrder(context.Context, *GetPurchaseOrderReq) (*PurchaseOrderInfo, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPurchaseOrder not implemented") } func (UnimplementedPurchaseServiceServer) ListPurchaseOrder(context.Context, *ListPurchaseOrderReq) (*ListPurchaseOrderResp, error) { return nil, status.Errorf(codes.Unimplemented, "method ListPurchaseOrder not implemented") } func (UnimplementedPurchaseServiceServer) CreatePurchaseReceipt(context.Context, *CreatePurchaseReceiptReq) (*IdResp, error) { return nil, status.Errorf(codes.Unimplemented, "method CreatePurchaseReceipt not implemented") } func (UnimplementedPurchaseServiceServer) ConfirmPurchaseReceipt(context.Context, *ConfirmPurchaseReceiptReq) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method ConfirmPurchaseReceipt not implemented") } func (UnimplementedPurchaseServiceServer) GetPurchaseReceipt(context.Context, *GetPurchaseReceiptReq) (*PurchaseReceiptInfo, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPurchaseReceipt not implemented") } func (UnimplementedPurchaseServiceServer) ListPurchaseReceipt(context.Context, *ListPurchaseReceiptReq) (*ListPurchaseReceiptResp, error) { return nil, status.Errorf(codes.Unimplemented, "method ListPurchaseReceipt not implemented") } func (UnimplementedPurchaseServiceServer) CreatePurchasePayment(context.Context, *CreatePurchasePaymentReq) (*IdResp, error) { return nil, status.Errorf(codes.Unimplemented, "method CreatePurchasePayment not implemented") } func (UnimplementedPurchaseServiceServer) ListPurchasePayment(context.Context, *ListPurchasePaymentReq) (*ListPurchasePaymentResp, error) { return nil, status.Errorf(codes.Unimplemented, "method ListPurchasePayment not implemented") } func (UnimplementedPurchaseServiceServer) ListInventoryLog(context.Context, *ListInventoryLogReq) (*ListInventoryLogResp, error) { return nil, status.Errorf(codes.Unimplemented, "method ListInventoryLog not implemented") } func (UnimplementedPurchaseServiceServer) GetPurchaseStatsSummary(context.Context, *PurchaseStatsSummaryReq) (*PurchaseStatsSummaryResp, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPurchaseStatsSummary not implemented") } func (UnimplementedPurchaseServiceServer) GetPurchaseStatsBySupplier(context.Context, *PurchaseStatsSummaryReq) (*PurchaseStatsBySupplierResp, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPurchaseStatsBySupplier not implemented") } func (UnimplementedPurchaseServiceServer) GetPurchaseStatsByProduct(context.Context, *PurchaseStatsSummaryReq) (*PurchaseStatsByProductResp, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPurchaseStatsByProduct not implemented") } func (UnimplementedPurchaseServiceServer) mustEmbedUnimplementedPurchaseServiceServer() {} type UnsafePurchaseServiceServer interface { mustEmbedUnimplementedPurchaseServiceServer() } func RegisterPurchaseServiceServer(s grpc.ServiceRegistrar, srv PurchaseServiceServer) { s.RegisterService(&PurchaseService_ServiceDesc, srv) } var PurchaseService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "purchase.PurchaseService", HandlerType: (*PurchaseServiceServer)(nil), Methods: []grpc.MethodDesc{ {MethodName: "CreateSupplier", Handler: _PurchaseService_CreateSupplier_Handler}, {MethodName: "UpdateSupplier", Handler: _PurchaseService_UpdateSupplier_Handler}, {MethodName: "DeleteSupplier", Handler: _PurchaseService_DeleteSupplier_Handler}, {MethodName: "GetSupplier", Handler: _PurchaseService_GetSupplier_Handler}, {MethodName: "ListSupplier", Handler: _PurchaseService_ListSupplier_Handler}, {MethodName: "CreatePurchaseOrder", Handler: _PurchaseService_CreatePurchaseOrder_Handler}, {MethodName: "UpdatePurchaseOrder", Handler: _PurchaseService_UpdatePurchaseOrder_Handler}, {MethodName: "ConfirmPurchaseOrder", Handler: _PurchaseService_ConfirmPurchaseOrder_Handler}, {MethodName: "CancelPurchaseOrder", Handler: _PurchaseService_CancelPurchaseOrder_Handler}, {MethodName: "GetPurchaseOrder", Handler: _PurchaseService_GetPurchaseOrder_Handler}, {MethodName: "ListPurchaseOrder", Handler: _PurchaseService_ListPurchaseOrder_Handler}, {MethodName: "CreatePurchaseReceipt", Handler: _PurchaseService_CreatePurchaseReceipt_Handler}, {MethodName: "ConfirmPurchaseReceipt", Handler: _PurchaseService_ConfirmPurchaseReceipt_Handler}, {MethodName: "GetPurchaseReceipt", Handler: _PurchaseService_GetPurchaseReceipt_Handler}, {MethodName: "ListPurchaseReceipt", Handler: _PurchaseService_ListPurchaseReceipt_Handler}, {MethodName: "CreatePurchasePayment", Handler: _PurchaseService_CreatePurchasePayment_Handler}, {MethodName: "ListPurchasePayment", Handler: _PurchaseService_ListPurchasePayment_Handler}, {MethodName: "ListInventoryLog", Handler: _PurchaseService_ListInventoryLog_Handler}, {MethodName: "GetPurchaseStatsSummary", Handler: _PurchaseService_GetPurchaseStatsSummary_Handler}, {MethodName: "GetPurchaseStatsBySupplier", Handler: _PurchaseService_GetPurchaseStatsBySupplier_Handler}, {MethodName: "GetPurchaseStatsByProduct", Handler: _PurchaseService_GetPurchaseStatsByProduct_Handler}, }, Streams: []grpc.StreamDesc{}, Metadata: "purchase.proto", } func _PurchaseService_CreateSupplier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateSupplierReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PurchaseServiceServer).CreateSupplier(ctx, in) } info := &grpc.UnaryServerInfo{Server: srv, FullMethod: "/purchase.PurchaseService/CreateSupplier"} handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PurchaseServiceServer).CreateSupplier(ctx, req.(*CreateSupplierReq)) } return interceptor(ctx, in, info, handler) } func _PurchaseService_UpdateSupplier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateSupplierReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PurchaseServiceServer).UpdateSupplier(ctx, in) } info := &grpc.UnaryServerInfo{Server: srv, FullMethod: "/purchase.PurchaseService/UpdateSupplier"} handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PurchaseServiceServer).UpdateSupplier(ctx, req.(*UpdateSupplierReq)) } return interceptor(ctx, in, info, handler) } func _PurchaseService_DeleteSupplier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteSupplierReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PurchaseServiceServer).DeleteSupplier(ctx, in) } info := &grpc.UnaryServerInfo{Server: srv, FullMethod: "/purchase.PurchaseService/DeleteSupplier"} handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PurchaseServiceServer).DeleteSupplier(ctx, req.(*DeleteSupplierReq)) } return interceptor(ctx, in, info, handler) } func _PurchaseService_GetSupplier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetSupplierReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PurchaseServiceServer).GetSupplier(ctx, in) } info := &grpc.UnaryServerInfo{Server: srv, FullMethod: "/purchase.PurchaseService/GetSupplier"} handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PurchaseServiceServer).GetSupplier(ctx, req.(*GetSupplierReq)) } return interceptor(ctx, in, info, handler) } func _PurchaseService_ListSupplier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListSupplierReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PurchaseServiceServer).ListSupplier(ctx, in) } info := &grpc.UnaryServerInfo{Server: srv, FullMethod: "/purchase.PurchaseService/ListSupplier"} handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PurchaseServiceServer).ListSupplier(ctx, req.(*ListSupplierReq)) } return interceptor(ctx, in, info, handler) } func _PurchaseService_CreatePurchaseOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreatePurchaseOrderReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PurchaseServiceServer).CreatePurchaseOrder(ctx, in) } info := &grpc.UnaryServerInfo{Server: srv, FullMethod: "/purchase.PurchaseService/CreatePurchaseOrder"} handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PurchaseServiceServer).CreatePurchaseOrder(ctx, req.(*CreatePurchaseOrderReq)) } return interceptor(ctx, in, info, handler) } func _PurchaseService_UpdatePurchaseOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdatePurchaseOrderReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PurchaseServiceServer).UpdatePurchaseOrder(ctx, in) } info := &grpc.UnaryServerInfo{Server: srv, FullMethod: "/purchase.PurchaseService/UpdatePurchaseOrder"} handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PurchaseServiceServer).UpdatePurchaseOrder(ctx, req.(*UpdatePurchaseOrderReq)) } return interceptor(ctx, in, info, handler) } func _PurchaseService_ConfirmPurchaseOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ConfirmPurchaseOrderReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PurchaseServiceServer).ConfirmPurchaseOrder(ctx, in) } info := &grpc.UnaryServerInfo{Server: srv, FullMethod: "/purchase.PurchaseService/ConfirmPurchaseOrder"} handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PurchaseServiceServer).ConfirmPurchaseOrder(ctx, req.(*ConfirmPurchaseOrderReq)) } return interceptor(ctx, in, info, handler) } func _PurchaseService_CancelPurchaseOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CancelPurchaseOrderReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PurchaseServiceServer).CancelPurchaseOrder(ctx, in) } info := &grpc.UnaryServerInfo{Server: srv, FullMethod: "/purchase.PurchaseService/CancelPurchaseOrder"} handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PurchaseServiceServer).CancelPurchaseOrder(ctx, req.(*CancelPurchaseOrderReq)) } return interceptor(ctx, in, info, handler) } func _PurchaseService_GetPurchaseOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetPurchaseOrderReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PurchaseServiceServer).GetPurchaseOrder(ctx, in) } info := &grpc.UnaryServerInfo{Server: srv, FullMethod: "/purchase.PurchaseService/GetPurchaseOrder"} handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PurchaseServiceServer).GetPurchaseOrder(ctx, req.(*GetPurchaseOrderReq)) } return interceptor(ctx, in, info, handler) } func _PurchaseService_ListPurchaseOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListPurchaseOrderReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PurchaseServiceServer).ListPurchaseOrder(ctx, in) } info := &grpc.UnaryServerInfo{Server: srv, FullMethod: "/purchase.PurchaseService/ListPurchaseOrder"} handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PurchaseServiceServer).ListPurchaseOrder(ctx, req.(*ListPurchaseOrderReq)) } return interceptor(ctx, in, info, handler) } func _PurchaseService_CreatePurchaseReceipt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreatePurchaseReceiptReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PurchaseServiceServer).CreatePurchaseReceipt(ctx, in) } info := &grpc.UnaryServerInfo{Server: srv, FullMethod: "/purchase.PurchaseService/CreatePurchaseReceipt"} handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PurchaseServiceServer).CreatePurchaseReceipt(ctx, req.(*CreatePurchaseReceiptReq)) } return interceptor(ctx, in, info, handler) } func _PurchaseService_ConfirmPurchaseReceipt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ConfirmPurchaseReceiptReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PurchaseServiceServer).ConfirmPurchaseReceipt(ctx, in) } info := &grpc.UnaryServerInfo{Server: srv, FullMethod: "/purchase.PurchaseService/ConfirmPurchaseReceipt"} handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PurchaseServiceServer).ConfirmPurchaseReceipt(ctx, req.(*ConfirmPurchaseReceiptReq)) } return interceptor(ctx, in, info, handler) } func _PurchaseService_GetPurchaseReceipt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetPurchaseReceiptReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PurchaseServiceServer).GetPurchaseReceipt(ctx, in) } info := &grpc.UnaryServerInfo{Server: srv, FullMethod: "/purchase.PurchaseService/GetPurchaseReceipt"} handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PurchaseServiceServer).GetPurchaseReceipt(ctx, req.(*GetPurchaseReceiptReq)) } return interceptor(ctx, in, info, handler) } func _PurchaseService_ListPurchaseReceipt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListPurchaseReceiptReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PurchaseServiceServer).ListPurchaseReceipt(ctx, in) } info := &grpc.UnaryServerInfo{Server: srv, FullMethod: "/purchase.PurchaseService/ListPurchaseReceipt"} handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PurchaseServiceServer).ListPurchaseReceipt(ctx, req.(*ListPurchaseReceiptReq)) } return interceptor(ctx, in, info, handler) } func _PurchaseService_CreatePurchasePayment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreatePurchasePaymentReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PurchaseServiceServer).CreatePurchasePayment(ctx, in) } info := &grpc.UnaryServerInfo{Server: srv, FullMethod: "/purchase.PurchaseService/CreatePurchasePayment"} handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PurchaseServiceServer).CreatePurchasePayment(ctx, req.(*CreatePurchasePaymentReq)) } return interceptor(ctx, in, info, handler) } func _PurchaseService_ListPurchasePayment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListPurchasePaymentReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PurchaseServiceServer).ListPurchasePayment(ctx, in) } info := &grpc.UnaryServerInfo{Server: srv, FullMethod: "/purchase.PurchaseService/ListPurchasePayment"} handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PurchaseServiceServer).ListPurchasePayment(ctx, req.(*ListPurchasePaymentReq)) } return interceptor(ctx, in, info, handler) } func _PurchaseService_ListInventoryLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListInventoryLogReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PurchaseServiceServer).ListInventoryLog(ctx, in) } info := &grpc.UnaryServerInfo{Server: srv, FullMethod: "/purchase.PurchaseService/ListInventoryLog"} handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PurchaseServiceServer).ListInventoryLog(ctx, req.(*ListInventoryLogReq)) } return interceptor(ctx, in, info, handler) } func _PurchaseService_GetPurchaseStatsSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PurchaseStatsSummaryReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PurchaseServiceServer).GetPurchaseStatsSummary(ctx, in) } info := &grpc.UnaryServerInfo{Server: srv, FullMethod: "/purchase.PurchaseService/GetPurchaseStatsSummary"} handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PurchaseServiceServer).GetPurchaseStatsSummary(ctx, req.(*PurchaseStatsSummaryReq)) } return interceptor(ctx, in, info, handler) } func _PurchaseService_GetPurchaseStatsBySupplier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PurchaseStatsSummaryReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PurchaseServiceServer).GetPurchaseStatsBySupplier(ctx, in) } info := &grpc.UnaryServerInfo{Server: srv, FullMethod: "/purchase.PurchaseService/GetPurchaseStatsBySupplier"} handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PurchaseServiceServer).GetPurchaseStatsBySupplier(ctx, req.(*PurchaseStatsSummaryReq)) } return interceptor(ctx, in, info, handler) } func _PurchaseService_GetPurchaseStatsByProduct_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PurchaseStatsSummaryReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PurchaseServiceServer).GetPurchaseStatsByProduct(ctx, in) } info := &grpc.UnaryServerInfo{Server: srv, FullMethod: "/purchase.PurchaseService/GetPurchaseStatsByProduct"} handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PurchaseServiceServer).GetPurchaseStatsByProduct(ctx, req.(*PurchaseStatsSummaryReq)) } return interceptor(ctx, in, info, handler) }