Products were inserted with empty tenant_id because ExtractTenantId was called after the Insert; moved extraction before the struct so rows are stored with the correct tenant and appear in list queries. Regenerated purchase.pb.go and purchase_grpc.pb.go from purchase.proto using protoc-gen-go v1.36.11; the previous hand-written stubs lacked the proto.Message interface, causing all purchase gRPC calls to fail with a marshal error.
894 lines
39 KiB
Go
894 lines
39 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.5.1
|
|
// - protoc v7.34.1
|
|
// source: purchase.proto
|
|
|
|
package pb
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
PurchaseService_CreateSupplier_FullMethodName = "/purchase.PurchaseService/CreateSupplier"
|
|
PurchaseService_UpdateSupplier_FullMethodName = "/purchase.PurchaseService/UpdateSupplier"
|
|
PurchaseService_DeleteSupplier_FullMethodName = "/purchase.PurchaseService/DeleteSupplier"
|
|
PurchaseService_GetSupplier_FullMethodName = "/purchase.PurchaseService/GetSupplier"
|
|
PurchaseService_ListSupplier_FullMethodName = "/purchase.PurchaseService/ListSupplier"
|
|
PurchaseService_CreatePurchaseOrder_FullMethodName = "/purchase.PurchaseService/CreatePurchaseOrder"
|
|
PurchaseService_UpdatePurchaseOrder_FullMethodName = "/purchase.PurchaseService/UpdatePurchaseOrder"
|
|
PurchaseService_ConfirmPurchaseOrder_FullMethodName = "/purchase.PurchaseService/ConfirmPurchaseOrder"
|
|
PurchaseService_CancelPurchaseOrder_FullMethodName = "/purchase.PurchaseService/CancelPurchaseOrder"
|
|
PurchaseService_GetPurchaseOrder_FullMethodName = "/purchase.PurchaseService/GetPurchaseOrder"
|
|
PurchaseService_ListPurchaseOrder_FullMethodName = "/purchase.PurchaseService/ListPurchaseOrder"
|
|
PurchaseService_CreatePurchaseReceipt_FullMethodName = "/purchase.PurchaseService/CreatePurchaseReceipt"
|
|
PurchaseService_ConfirmPurchaseReceipt_FullMethodName = "/purchase.PurchaseService/ConfirmPurchaseReceipt"
|
|
PurchaseService_GetPurchaseReceipt_FullMethodName = "/purchase.PurchaseService/GetPurchaseReceipt"
|
|
PurchaseService_ListPurchaseReceipt_FullMethodName = "/purchase.PurchaseService/ListPurchaseReceipt"
|
|
PurchaseService_CreatePurchasePayment_FullMethodName = "/purchase.PurchaseService/CreatePurchasePayment"
|
|
PurchaseService_ListPurchasePayment_FullMethodName = "/purchase.PurchaseService/ListPurchasePayment"
|
|
PurchaseService_ListInventoryLog_FullMethodName = "/purchase.PurchaseService/ListInventoryLog"
|
|
PurchaseService_GetPurchaseStatsSummary_FullMethodName = "/purchase.PurchaseService/GetPurchaseStatsSummary"
|
|
PurchaseService_GetPurchaseStatsBySupplier_FullMethodName = "/purchase.PurchaseService/GetPurchaseStatsBySupplier"
|
|
PurchaseService_GetPurchaseStatsByProduct_FullMethodName = "/purchase.PurchaseService/GetPurchaseStatsByProduct"
|
|
)
|
|
|
|
// PurchaseServiceClient is the client API for PurchaseService 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 PurchaseServiceClient interface {
|
|
// Supplier CRUD
|
|
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)
|
|
// PurchaseOrder CRUD + status
|
|
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)
|
|
// Receipt
|
|
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)
|
|
// Payment
|
|
CreatePurchasePayment(ctx context.Context, in *CreatePurchasePaymentReq, opts ...grpc.CallOption) (*IdResp, error)
|
|
ListPurchasePayment(ctx context.Context, in *ListPurchasePaymentReq, opts ...grpc.CallOption) (*ListPurchasePaymentResp, error)
|
|
// InventoryLog
|
|
ListInventoryLog(ctx context.Context, in *ListInventoryLogReq, opts ...grpc.CallOption) (*ListInventoryLogResp, error)
|
|
// Stats
|
|
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) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(IdResp)
|
|
err := c.cc.Invoke(ctx, PurchaseService_CreateSupplier_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *purchaseServiceClient) UpdateSupplier(ctx context.Context, in *UpdateSupplierReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Empty)
|
|
err := c.cc.Invoke(ctx, PurchaseService_UpdateSupplier_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *purchaseServiceClient) DeleteSupplier(ctx context.Context, in *DeleteSupplierReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Empty)
|
|
err := c.cc.Invoke(ctx, PurchaseService_DeleteSupplier_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *purchaseServiceClient) GetSupplier(ctx context.Context, in *GetSupplierReq, opts ...grpc.CallOption) (*SupplierInfo, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SupplierInfo)
|
|
err := c.cc.Invoke(ctx, PurchaseService_GetSupplier_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *purchaseServiceClient) ListSupplier(ctx context.Context, in *ListSupplierReq, opts ...grpc.CallOption) (*ListSupplierResp, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListSupplierResp)
|
|
err := c.cc.Invoke(ctx, PurchaseService_ListSupplier_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *purchaseServiceClient) CreatePurchaseOrder(ctx context.Context, in *CreatePurchaseOrderReq, opts ...grpc.CallOption) (*IdResp, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(IdResp)
|
|
err := c.cc.Invoke(ctx, PurchaseService_CreatePurchaseOrder_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *purchaseServiceClient) UpdatePurchaseOrder(ctx context.Context, in *UpdatePurchaseOrderReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Empty)
|
|
err := c.cc.Invoke(ctx, PurchaseService_UpdatePurchaseOrder_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *purchaseServiceClient) ConfirmPurchaseOrder(ctx context.Context, in *ConfirmPurchaseOrderReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Empty)
|
|
err := c.cc.Invoke(ctx, PurchaseService_ConfirmPurchaseOrder_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *purchaseServiceClient) CancelPurchaseOrder(ctx context.Context, in *CancelPurchaseOrderReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Empty)
|
|
err := c.cc.Invoke(ctx, PurchaseService_CancelPurchaseOrder_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *purchaseServiceClient) GetPurchaseOrder(ctx context.Context, in *GetPurchaseOrderReq, opts ...grpc.CallOption) (*PurchaseOrderInfo, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(PurchaseOrderInfo)
|
|
err := c.cc.Invoke(ctx, PurchaseService_GetPurchaseOrder_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *purchaseServiceClient) ListPurchaseOrder(ctx context.Context, in *ListPurchaseOrderReq, opts ...grpc.CallOption) (*ListPurchaseOrderResp, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListPurchaseOrderResp)
|
|
err := c.cc.Invoke(ctx, PurchaseService_ListPurchaseOrder_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *purchaseServiceClient) CreatePurchaseReceipt(ctx context.Context, in *CreatePurchaseReceiptReq, opts ...grpc.CallOption) (*IdResp, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(IdResp)
|
|
err := c.cc.Invoke(ctx, PurchaseService_CreatePurchaseReceipt_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *purchaseServiceClient) ConfirmPurchaseReceipt(ctx context.Context, in *ConfirmPurchaseReceiptReq, opts ...grpc.CallOption) (*Empty, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Empty)
|
|
err := c.cc.Invoke(ctx, PurchaseService_ConfirmPurchaseReceipt_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *purchaseServiceClient) GetPurchaseReceipt(ctx context.Context, in *GetPurchaseReceiptReq, opts ...grpc.CallOption) (*PurchaseReceiptInfo, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(PurchaseReceiptInfo)
|
|
err := c.cc.Invoke(ctx, PurchaseService_GetPurchaseReceipt_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *purchaseServiceClient) ListPurchaseReceipt(ctx context.Context, in *ListPurchaseReceiptReq, opts ...grpc.CallOption) (*ListPurchaseReceiptResp, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListPurchaseReceiptResp)
|
|
err := c.cc.Invoke(ctx, PurchaseService_ListPurchaseReceipt_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *purchaseServiceClient) CreatePurchasePayment(ctx context.Context, in *CreatePurchasePaymentReq, opts ...grpc.CallOption) (*IdResp, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(IdResp)
|
|
err := c.cc.Invoke(ctx, PurchaseService_CreatePurchasePayment_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *purchaseServiceClient) ListPurchasePayment(ctx context.Context, in *ListPurchasePaymentReq, opts ...grpc.CallOption) (*ListPurchasePaymentResp, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListPurchasePaymentResp)
|
|
err := c.cc.Invoke(ctx, PurchaseService_ListPurchasePayment_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *purchaseServiceClient) ListInventoryLog(ctx context.Context, in *ListInventoryLogReq, opts ...grpc.CallOption) (*ListInventoryLogResp, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListInventoryLogResp)
|
|
err := c.cc.Invoke(ctx, PurchaseService_ListInventoryLog_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *purchaseServiceClient) GetPurchaseStatsSummary(ctx context.Context, in *PurchaseStatsSummaryReq, opts ...grpc.CallOption) (*PurchaseStatsSummaryResp, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(PurchaseStatsSummaryResp)
|
|
err := c.cc.Invoke(ctx, PurchaseService_GetPurchaseStatsSummary_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *purchaseServiceClient) GetPurchaseStatsBySupplier(ctx context.Context, in *PurchaseStatsSummaryReq, opts ...grpc.CallOption) (*PurchaseStatsBySupplierResp, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(PurchaseStatsBySupplierResp)
|
|
err := c.cc.Invoke(ctx, PurchaseService_GetPurchaseStatsBySupplier_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *purchaseServiceClient) GetPurchaseStatsByProduct(ctx context.Context, in *PurchaseStatsSummaryReq, opts ...grpc.CallOption) (*PurchaseStatsByProductResp, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(PurchaseStatsByProductResp)
|
|
err := c.cc.Invoke(ctx, PurchaseService_GetPurchaseStatsByProduct_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// PurchaseServiceServer is the server API for PurchaseService service.
|
|
// All implementations must embed UnimplementedPurchaseServiceServer
|
|
// for forward compatibility.
|
|
type PurchaseServiceServer interface {
|
|
// Supplier CRUD
|
|
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)
|
|
// PurchaseOrder CRUD + status
|
|
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)
|
|
// Receipt
|
|
CreatePurchaseReceipt(context.Context, *CreatePurchaseReceiptReq) (*IdResp, error)
|
|
ConfirmPurchaseReceipt(context.Context, *ConfirmPurchaseReceiptReq) (*Empty, error)
|
|
GetPurchaseReceipt(context.Context, *GetPurchaseReceiptReq) (*PurchaseReceiptInfo, error)
|
|
ListPurchaseReceipt(context.Context, *ListPurchaseReceiptReq) (*ListPurchaseReceiptResp, error)
|
|
// Payment
|
|
CreatePurchasePayment(context.Context, *CreatePurchasePaymentReq) (*IdResp, error)
|
|
ListPurchasePayment(context.Context, *ListPurchasePaymentReq) (*ListPurchasePaymentResp, error)
|
|
// InventoryLog
|
|
ListInventoryLog(context.Context, *ListInventoryLogReq) (*ListInventoryLogResp, error)
|
|
// Stats
|
|
GetPurchaseStatsSummary(context.Context, *PurchaseStatsSummaryReq) (*PurchaseStatsSummaryResp, error)
|
|
GetPurchaseStatsBySupplier(context.Context, *PurchaseStatsSummaryReq) (*PurchaseStatsBySupplierResp, error)
|
|
GetPurchaseStatsByProduct(context.Context, *PurchaseStatsSummaryReq) (*PurchaseStatsByProductResp, error)
|
|
mustEmbedUnimplementedPurchaseServiceServer()
|
|
}
|
|
|
|
// UnimplementedPurchaseServiceServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
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() {}
|
|
func (UnimplementedPurchaseServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafePurchaseServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to PurchaseServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafePurchaseServiceServer interface {
|
|
mustEmbedUnimplementedPurchaseServiceServer()
|
|
}
|
|
|
|
func RegisterPurchaseServiceServer(s grpc.ServiceRegistrar, srv PurchaseServiceServer) {
|
|
// If the following call pancis, it indicates UnimplementedPurchaseServiceServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&PurchaseService_ServiceDesc, srv)
|
|
}
|
|
|
|
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: PurchaseService_CreateSupplier_FullMethodName,
|
|
}
|
|
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: PurchaseService_UpdateSupplier_FullMethodName,
|
|
}
|
|
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: PurchaseService_DeleteSupplier_FullMethodName,
|
|
}
|
|
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: PurchaseService_GetSupplier_FullMethodName,
|
|
}
|
|
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: PurchaseService_ListSupplier_FullMethodName,
|
|
}
|
|
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: PurchaseService_CreatePurchaseOrder_FullMethodName,
|
|
}
|
|
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: PurchaseService_UpdatePurchaseOrder_FullMethodName,
|
|
}
|
|
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: PurchaseService_ConfirmPurchaseOrder_FullMethodName,
|
|
}
|
|
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: PurchaseService_CancelPurchaseOrder_FullMethodName,
|
|
}
|
|
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: PurchaseService_GetPurchaseOrder_FullMethodName,
|
|
}
|
|
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: PurchaseService_ListPurchaseOrder_FullMethodName,
|
|
}
|
|
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: PurchaseService_CreatePurchaseReceipt_FullMethodName,
|
|
}
|
|
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: PurchaseService_ConfirmPurchaseReceipt_FullMethodName,
|
|
}
|
|
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: PurchaseService_GetPurchaseReceipt_FullMethodName,
|
|
}
|
|
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: PurchaseService_ListPurchaseReceipt_FullMethodName,
|
|
}
|
|
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: PurchaseService_CreatePurchasePayment_FullMethodName,
|
|
}
|
|
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: PurchaseService_ListPurchasePayment_FullMethodName,
|
|
}
|
|
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: PurchaseService_ListInventoryLog_FullMethodName,
|
|
}
|
|
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: PurchaseService_GetPurchaseStatsSummary_FullMethodName,
|
|
}
|
|
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: PurchaseService_GetPurchaseStatsBySupplier_FullMethodName,
|
|
}
|
|
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: PurchaseService_GetPurchaseStatsByProduct_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PurchaseServiceServer).GetPurchaseStatsByProduct(ctx, req.(*PurchaseStatsSummaryReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// PurchaseService_ServiceDesc is the grpc.ServiceDesc for PurchaseService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
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",
|
|
}
|