792 lines
29 KiB
Go
792 lines
29 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.6.2
|
|
// - protoc v3.19.4
|
|
// source: product/product.proto
|
|
|
|
package product
|
|
|
|
import (
|
|
context "context"
|
|
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
|
)
|
|
|
|
// 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 (
|
|
Product_Create_FullMethodName = "/product.Product/Create"
|
|
Product_Info_FullMethodName = "/product.Product/Info"
|
|
Product_Items_FullMethodName = "/product.Product/Items"
|
|
Product_Names_FullMethodName = "/product.Product/Names"
|
|
Product_Status_FullMethodName = "/product.Product/Status"
|
|
Product_Sort_FullMethodName = "/product.Product/Sort"
|
|
Product_Verify_FullMethodName = "/product.Product/Verify"
|
|
Product_VerifyFirst_FullMethodName = "/product.Product/VerifyFirst"
|
|
Product_VerifySecond_FullMethodName = "/product.Product/VerifySecond"
|
|
Product_EditApply_FullMethodName = "/product.Product/EditApply"
|
|
Product_EditBase_FullMethodName = "/product.Product/EditBase"
|
|
Product_EditSusceptible_FullMethodName = "/product.Product/EditSusceptible"
|
|
Product_EditApplyPass_FullMethodName = "/product.Product/EditApplyPass"
|
|
Product_Number_FullMethodName = "/product.Product/Number"
|
|
Product_NumberItems_FullMethodName = "/product.Product/NumberItems"
|
|
Product_InfoById_FullMethodName = "/product.Product/InfoById"
|
|
Product_ItemsByIds_FullMethodName = "/product.Product/ItemsByIds"
|
|
Product_NumberAdd_FullMethodName = "/product.Product/NumberAdd"
|
|
)
|
|
|
|
// ProductClient is the client API for Product 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 ProductClient interface {
|
|
Create(ctx context.Context, in *CreateReq, opts ...grpc.CallOption) (*Response, error)
|
|
Info(ctx context.Context, in *InfoReq, opts ...grpc.CallOption) (*Response, error)
|
|
Items(ctx context.Context, in *ItemsReq, opts ...grpc.CallOption) (*Response, error)
|
|
Names(ctx context.Context, in *NamesReq, opts ...grpc.CallOption) (*Response, error)
|
|
Status(ctx context.Context, in *StatusReq, opts ...grpc.CallOption) (*Response, error)
|
|
Sort(ctx context.Context, in *SortReq, opts ...grpc.CallOption) (*Response, error)
|
|
// 审核列表: status: 1: 一审, 2: 二审
|
|
Verify(ctx context.Context, in *VerifyReq, opts ...grpc.CallOption) (*Response, error)
|
|
// 一审通过/驳回
|
|
VerifyFirst(ctx context.Context, in *VerifyStatusReq, opts ...grpc.CallOption) (*Response, error)
|
|
// 二审通过/驳回
|
|
VerifySecond(ctx context.Context, in *VerifyStatusReq, opts ...grpc.CallOption) (*Response, error)
|
|
// 编辑申请
|
|
EditApply(ctx context.Context, in *EditApplyReq, opts ...grpc.CallOption) (*Response, error)
|
|
// 编辑基础信息
|
|
EditBase(ctx context.Context, in *EditBaseReq, opts ...grpc.CallOption) (*Response, error)
|
|
// 编辑敏感信息(进入一审)
|
|
EditSusceptible(ctx context.Context, in *EditSusceptibleReq, opts ...grpc.CallOption) (*Response, error)
|
|
// TODO: 临时接口,企微编辑申请审批对接后删除
|
|
EditApplyPass(ctx context.Context, in *EditApplyPassReq, opts ...grpc.CallOption) (*Response, error)
|
|
// 增减库存
|
|
// type: 1 增加, 2 减少
|
|
Number(ctx context.Context, in *NumberReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// 批量增减库存
|
|
NumberItems(ctx context.Context, in *NumberItemsReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
InfoById(ctx context.Context, in *InfoByIdReq, opts ...grpc.CallOption) (*Item, error)
|
|
ItemsByIds(ctx context.Context, in *ItemsByIdsReq, opts ...grpc.CallOption) (*ItemsByIdsData, error)
|
|
// 增加库存
|
|
NumberAdd(ctx context.Context, in *NumberAddReq, opts ...grpc.CallOption) (*Response, error)
|
|
}
|
|
|
|
type productClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewProductClient(cc grpc.ClientConnInterface) ProductClient {
|
|
return &productClient{cc}
|
|
}
|
|
|
|
func (c *productClient) Create(ctx context.Context, in *CreateReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Product_Create_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) Info(ctx context.Context, in *InfoReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Product_Info_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) Items(ctx context.Context, in *ItemsReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Product_Items_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) Names(ctx context.Context, in *NamesReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Product_Names_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) Status(ctx context.Context, in *StatusReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Product_Status_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) Sort(ctx context.Context, in *SortReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Product_Sort_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) Verify(ctx context.Context, in *VerifyReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Product_Verify_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) VerifyFirst(ctx context.Context, in *VerifyStatusReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Product_VerifyFirst_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) VerifySecond(ctx context.Context, in *VerifyStatusReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Product_VerifySecond_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) EditApply(ctx context.Context, in *EditApplyReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Product_EditApply_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) EditBase(ctx context.Context, in *EditBaseReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Product_EditBase_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) EditSusceptible(ctx context.Context, in *EditSusceptibleReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Product_EditSusceptible_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) EditApplyPass(ctx context.Context, in *EditApplyPassReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Product_EditApplyPass_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) Number(ctx context.Context, in *NumberReq, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, Product_Number_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) NumberItems(ctx context.Context, in *NumberItemsReq, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, Product_NumberItems_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) InfoById(ctx context.Context, in *InfoByIdReq, opts ...grpc.CallOption) (*Item, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Item)
|
|
err := c.cc.Invoke(ctx, Product_InfoById_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) ItemsByIds(ctx context.Context, in *ItemsByIdsReq, opts ...grpc.CallOption) (*ItemsByIdsData, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ItemsByIdsData)
|
|
err := c.cc.Invoke(ctx, Product_ItemsByIds_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) NumberAdd(ctx context.Context, in *NumberAddReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Product_NumberAdd_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ProductServer is the server API for Product service.
|
|
// All implementations must embed UnimplementedProductServer
|
|
// for forward compatibility.
|
|
type ProductServer interface {
|
|
Create(context.Context, *CreateReq) (*Response, error)
|
|
Info(context.Context, *InfoReq) (*Response, error)
|
|
Items(context.Context, *ItemsReq) (*Response, error)
|
|
Names(context.Context, *NamesReq) (*Response, error)
|
|
Status(context.Context, *StatusReq) (*Response, error)
|
|
Sort(context.Context, *SortReq) (*Response, error)
|
|
// 审核列表: status: 1: 一审, 2: 二审
|
|
Verify(context.Context, *VerifyReq) (*Response, error)
|
|
// 一审通过/驳回
|
|
VerifyFirst(context.Context, *VerifyStatusReq) (*Response, error)
|
|
// 二审通过/驳回
|
|
VerifySecond(context.Context, *VerifyStatusReq) (*Response, error)
|
|
// 编辑申请
|
|
EditApply(context.Context, *EditApplyReq) (*Response, error)
|
|
// 编辑基础信息
|
|
EditBase(context.Context, *EditBaseReq) (*Response, error)
|
|
// 编辑敏感信息(进入一审)
|
|
EditSusceptible(context.Context, *EditSusceptibleReq) (*Response, error)
|
|
// TODO: 临时接口,企微编辑申请审批对接后删除
|
|
EditApplyPass(context.Context, *EditApplyPassReq) (*Response, error)
|
|
// 增减库存
|
|
// type: 1 增加, 2 减少
|
|
Number(context.Context, *NumberReq) (*emptypb.Empty, error)
|
|
// 批量增减库存(服务内按 id 排序后在同一事务中执行,防死锁)
|
|
NumberItems(context.Context, *NumberItemsReq) (*emptypb.Empty, error)
|
|
InfoById(context.Context, *InfoByIdReq) (*Item, error)
|
|
ItemsByIds(context.Context, *ItemsByIdsReq) (*ItemsByIdsData, error)
|
|
// 增加库存
|
|
NumberAdd(context.Context, *NumberAddReq) (*Response, error)
|
|
mustEmbedUnimplementedProductServer()
|
|
}
|
|
|
|
// UnimplementedProductServer 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 UnimplementedProductServer struct{}
|
|
|
|
func (UnimplementedProductServer) Create(context.Context, *CreateReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method Create not implemented")
|
|
}
|
|
func (UnimplementedProductServer) Info(context.Context, *InfoReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method Info not implemented")
|
|
}
|
|
func (UnimplementedProductServer) Items(context.Context, *ItemsReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method Items not implemented")
|
|
}
|
|
func (UnimplementedProductServer) Names(context.Context, *NamesReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method Names not implemented")
|
|
}
|
|
func (UnimplementedProductServer) Status(context.Context, *StatusReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method Status not implemented")
|
|
}
|
|
func (UnimplementedProductServer) Sort(context.Context, *SortReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method Sort not implemented")
|
|
}
|
|
func (UnimplementedProductServer) Verify(context.Context, *VerifyReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method Verify not implemented")
|
|
}
|
|
func (UnimplementedProductServer) VerifyFirst(context.Context, *VerifyStatusReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method VerifyFirst not implemented")
|
|
}
|
|
func (UnimplementedProductServer) VerifySecond(context.Context, *VerifyStatusReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method VerifySecond not implemented")
|
|
}
|
|
func (UnimplementedProductServer) EditApply(context.Context, *EditApplyReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method EditApply not implemented")
|
|
}
|
|
func (UnimplementedProductServer) EditBase(context.Context, *EditBaseReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method EditBase not implemented")
|
|
}
|
|
func (UnimplementedProductServer) EditSusceptible(context.Context, *EditSusceptibleReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method EditSusceptible not implemented")
|
|
}
|
|
func (UnimplementedProductServer) EditApplyPass(context.Context, *EditApplyPassReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method EditApplyPass not implemented")
|
|
}
|
|
func (UnimplementedProductServer) Number(context.Context, *NumberReq) (*emptypb.Empty, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method Number not implemented")
|
|
}
|
|
func (UnimplementedProductServer) NumberItems(context.Context, *NumberItemsReq) (*emptypb.Empty, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method NumberItems not implemented")
|
|
}
|
|
func (UnimplementedProductServer) InfoById(context.Context, *InfoByIdReq) (*Item, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method InfoById not implemented")
|
|
}
|
|
func (UnimplementedProductServer) ItemsByIds(context.Context, *ItemsByIdsReq) (*ItemsByIdsData, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ItemsByIds not implemented")
|
|
}
|
|
func (UnimplementedProductServer) NumberAdd(context.Context, *NumberAddReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method NumberAdd not implemented")
|
|
}
|
|
func (UnimplementedProductServer) mustEmbedUnimplementedProductServer() {}
|
|
func (UnimplementedProductServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeProductServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to ProductServer will
|
|
// result in compilation errors.
|
|
type UnsafeProductServer interface {
|
|
mustEmbedUnimplementedProductServer()
|
|
}
|
|
|
|
func RegisterProductServer(s grpc.ServiceRegistrar, srv ProductServer) {
|
|
// If the following call panics, it indicates UnimplementedProductServer 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(&Product_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Product_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).Create(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_Create_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).Create(ctx, req.(*CreateReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(InfoReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).Info(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_Info_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).Info(ctx, req.(*InfoReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_Items_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ItemsReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).Items(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_Items_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).Items(ctx, req.(*ItemsReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_Names_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(NamesReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).Names(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_Names_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).Names(ctx, req.(*NamesReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(StatusReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).Status(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_Status_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).Status(ctx, req.(*StatusReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_Sort_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SortReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).Sort(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_Sort_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).Sort(ctx, req.(*SortReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_Verify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(VerifyReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).Verify(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_Verify_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).Verify(ctx, req.(*VerifyReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_VerifyFirst_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(VerifyStatusReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).VerifyFirst(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_VerifyFirst_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).VerifyFirst(ctx, req.(*VerifyStatusReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_VerifySecond_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(VerifyStatusReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).VerifySecond(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_VerifySecond_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).VerifySecond(ctx, req.(*VerifyStatusReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_EditApply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(EditApplyReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).EditApply(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_EditApply_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).EditApply(ctx, req.(*EditApplyReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_EditBase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(EditBaseReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).EditBase(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_EditBase_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).EditBase(ctx, req.(*EditBaseReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_EditSusceptible_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(EditSusceptibleReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).EditSusceptible(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_EditSusceptible_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).EditSusceptible(ctx, req.(*EditSusceptibleReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_EditApplyPass_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(EditApplyPassReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).EditApplyPass(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_EditApplyPass_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).EditApplyPass(ctx, req.(*EditApplyPassReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_Number_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(NumberReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).Number(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_Number_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).Number(ctx, req.(*NumberReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_NumberItems_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(NumberItemsReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).NumberItems(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_NumberItems_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).NumberItems(ctx, req.(*NumberItemsReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_InfoById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(InfoByIdReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).InfoById(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_InfoById_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).InfoById(ctx, req.(*InfoByIdReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_ItemsByIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ItemsByIdsReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).ItemsByIds(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_ItemsByIds_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).ItemsByIds(ctx, req.(*ItemsByIdsReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_NumberAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(NumberAddReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).NumberAdd(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_NumberAdd_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).NumberAdd(ctx, req.(*NumberAddReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Product_ServiceDesc is the grpc.ServiceDesc for Product service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Product_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "product.Product",
|
|
HandlerType: (*ProductServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Create",
|
|
Handler: _Product_Create_Handler,
|
|
},
|
|
{
|
|
MethodName: "Info",
|
|
Handler: _Product_Info_Handler,
|
|
},
|
|
{
|
|
MethodName: "Items",
|
|
Handler: _Product_Items_Handler,
|
|
},
|
|
{
|
|
MethodName: "Names",
|
|
Handler: _Product_Names_Handler,
|
|
},
|
|
{
|
|
MethodName: "Status",
|
|
Handler: _Product_Status_Handler,
|
|
},
|
|
{
|
|
MethodName: "Sort",
|
|
Handler: _Product_Sort_Handler,
|
|
},
|
|
{
|
|
MethodName: "Verify",
|
|
Handler: _Product_Verify_Handler,
|
|
},
|
|
{
|
|
MethodName: "VerifyFirst",
|
|
Handler: _Product_VerifyFirst_Handler,
|
|
},
|
|
{
|
|
MethodName: "VerifySecond",
|
|
Handler: _Product_VerifySecond_Handler,
|
|
},
|
|
{
|
|
MethodName: "EditApply",
|
|
Handler: _Product_EditApply_Handler,
|
|
},
|
|
{
|
|
MethodName: "EditBase",
|
|
Handler: _Product_EditBase_Handler,
|
|
},
|
|
{
|
|
MethodName: "EditSusceptible",
|
|
Handler: _Product_EditSusceptible_Handler,
|
|
},
|
|
{
|
|
MethodName: "EditApplyPass",
|
|
Handler: _Product_EditApplyPass_Handler,
|
|
},
|
|
{
|
|
MethodName: "Number",
|
|
Handler: _Product_Number_Handler,
|
|
},
|
|
{
|
|
MethodName: "NumberItems",
|
|
Handler: _Product_NumberItems_Handler,
|
|
},
|
|
{
|
|
MethodName: "InfoById",
|
|
Handler: _Product_InfoById_Handler,
|
|
},
|
|
{
|
|
MethodName: "ItemsByIds",
|
|
Handler: _Product_ItemsByIds_Handler,
|
|
},
|
|
{
|
|
MethodName: "NumberAdd",
|
|
Handler: _Product_NumberAdd_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "product/product.proto",
|
|
}
|