926 lines
35 KiB
Go
926 lines
35 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.6.2
|
|
// - protoc v7.35.1
|
|
// source: module/ec/mall/proto/product.proto
|
|
|
|
package mall
|
|
|
|
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 (
|
|
Product_ItemFetch_FullMethodName = "/mall.Product/ItemFetch"
|
|
Product_ItemDetail_FullMethodName = "/mall.Product/ItemDetail"
|
|
Product_ItemDetailBySerial_FullMethodName = "/mall.Product/ItemDetailBySerial"
|
|
Product_ItemDetailBySpec_FullMethodName = "/mall.Product/ItemDetailBySpec"
|
|
Product_ItemCreate_FullMethodName = "/mall.Product/ItemCreate"
|
|
Product_ItemDelete_FullMethodName = "/mall.Product/ItemDelete"
|
|
Product_ItemModify_FullMethodName = "/mall.Product/ItemModify"
|
|
Product_ItemBatchOp_FullMethodName = "/mall.Product/ItemBatchOp"
|
|
Product_SpecFetch_FullMethodName = "/mall.Product/SpecFetch"
|
|
Product_SpecCreate_FullMethodName = "/mall.Product/SpecCreate"
|
|
Product_SpecModify_FullMethodName = "/mall.Product/SpecModify"
|
|
Product_SpecDelete_FullMethodName = "/mall.Product/SpecDelete"
|
|
Product_SpecDetail_FullMethodName = "/mall.Product/SpecDetail"
|
|
Product_PhotoCreate_FullMethodName = "/mall.Product/PhotoCreate"
|
|
Product_PhotoDelete_FullMethodName = "/mall.Product/PhotoDelete"
|
|
Product_PhotoList_FullMethodName = "/mall.Product/PhotoList"
|
|
Product_CommentFetch_FullMethodName = "/mall.Product/CommentFetch"
|
|
Product_CommentCreate_FullMethodName = "/mall.Product/CommentCreate"
|
|
Product_CommentRe_FullMethodName = "/mall.Product/CommentRe"
|
|
Product_CommentDelete_FullMethodName = "/mall.Product/CommentDelete"
|
|
Product_CommentModify_FullMethodName = "/mall.Product/CommentModify"
|
|
)
|
|
|
|
// 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 {
|
|
// 获取产品列表
|
|
ItemFetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*ListReply, error)
|
|
// 获取产品详情
|
|
ItemDetail(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*ProductItem, error)
|
|
// 通过产品序列获取产品详情
|
|
ItemDetailBySerial(ctx context.Context, in *StoreSerialRequest, opts ...grpc.CallOption) (*ListReply, error)
|
|
// 通过规格编号获取产品详情
|
|
ItemDetailBySpec(ctx context.Context, in *DetailBySpecRequest, opts ...grpc.CallOption) (*ListItem, error)
|
|
// 添加产品
|
|
ItemCreate(ctx context.Context, in *ProductItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
|
|
// 删除产品
|
|
ItemDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
|
|
// 发布/取消发布 产品
|
|
ItemModify(ctx context.Context, in *ModifyRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
|
|
// 批量操作
|
|
ItemBatchOp(ctx context.Context, in *OpRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
|
|
// 产品规格列表
|
|
SpecFetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*SpecReply, error)
|
|
// 添加产品规格
|
|
SpecCreate(ctx context.Context, in *SpecItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
|
|
// 修改产品规格
|
|
SpecModify(ctx context.Context, in *SpecItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
|
|
// 删除产品规格
|
|
SpecDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
|
|
// 产品详情
|
|
SpecDetail(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*SpecItem, error)
|
|
// 添加产品图片
|
|
PhotoCreate(ctx context.Context, in *PhotoItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
|
|
// 删除产品图片
|
|
PhotoDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
|
|
// 产品图片列表
|
|
PhotoList(ctx context.Context, in *PhotoItem, opts ...grpc.CallOption) (*PhotoReply, error)
|
|
// 产品的评论列表
|
|
CommentFetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*CommentListReply, error)
|
|
// 评论
|
|
CommentCreate(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
|
|
// 回复评论
|
|
CommentRe(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
|
|
// 删除评论
|
|
CommentDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
|
|
// 修改评论
|
|
CommentModify(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
|
|
}
|
|
|
|
type productClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewProductClient(cc grpc.ClientConnInterface) ProductClient {
|
|
return &productClient{cc}
|
|
}
|
|
|
|
func (c *productClient) ItemFetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*ListReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListReply)
|
|
err := c.cc.Invoke(ctx, Product_ItemFetch_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) ItemDetail(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*ProductItem, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ProductItem)
|
|
err := c.cc.Invoke(ctx, Product_ItemDetail_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) ItemDetailBySerial(ctx context.Context, in *StoreSerialRequest, opts ...grpc.CallOption) (*ListReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListReply)
|
|
err := c.cc.Invoke(ctx, Product_ItemDetailBySerial_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) ItemDetailBySpec(ctx context.Context, in *DetailBySpecRequest, opts ...grpc.CallOption) (*ListItem, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListItem)
|
|
err := c.cc.Invoke(ctx, Product_ItemDetailBySpec_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) ItemCreate(ctx context.Context, in *ProductItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(IdentityStatusReply)
|
|
err := c.cc.Invoke(ctx, Product_ItemCreate_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) ItemDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(IdentityStatusReply)
|
|
err := c.cc.Invoke(ctx, Product_ItemDelete_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) ItemModify(ctx context.Context, in *ModifyRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(IdentityStatusReply)
|
|
err := c.cc.Invoke(ctx, Product_ItemModify_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) ItemBatchOp(ctx context.Context, in *OpRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(IdentityStatusReply)
|
|
err := c.cc.Invoke(ctx, Product_ItemBatchOp_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) SpecFetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*SpecReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SpecReply)
|
|
err := c.cc.Invoke(ctx, Product_SpecFetch_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) SpecCreate(ctx context.Context, in *SpecItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(IdentityStatusReply)
|
|
err := c.cc.Invoke(ctx, Product_SpecCreate_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) SpecModify(ctx context.Context, in *SpecItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(IdentityStatusReply)
|
|
err := c.cc.Invoke(ctx, Product_SpecModify_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) SpecDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(IdentityStatusReply)
|
|
err := c.cc.Invoke(ctx, Product_SpecDelete_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) SpecDetail(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*SpecItem, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SpecItem)
|
|
err := c.cc.Invoke(ctx, Product_SpecDetail_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) PhotoCreate(ctx context.Context, in *PhotoItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(IdentityStatusReply)
|
|
err := c.cc.Invoke(ctx, Product_PhotoCreate_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) PhotoDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(IdentityStatusReply)
|
|
err := c.cc.Invoke(ctx, Product_PhotoDelete_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) PhotoList(ctx context.Context, in *PhotoItem, opts ...grpc.CallOption) (*PhotoReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(PhotoReply)
|
|
err := c.cc.Invoke(ctx, Product_PhotoList_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) CommentFetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*CommentListReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CommentListReply)
|
|
err := c.cc.Invoke(ctx, Product_CommentFetch_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) CommentCreate(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(IdentityStatusReply)
|
|
err := c.cc.Invoke(ctx, Product_CommentCreate_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) CommentRe(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(IdentityStatusReply)
|
|
err := c.cc.Invoke(ctx, Product_CommentRe_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) CommentDelete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(IdentityStatusReply)
|
|
err := c.cc.Invoke(ctx, Product_CommentDelete_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *productClient) CommentModify(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(IdentityStatusReply)
|
|
err := c.cc.Invoke(ctx, Product_CommentModify_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ProductServer is the server API for Product service.
|
|
// All implementations should embed UnimplementedProductServer
|
|
// for forward compatibility.
|
|
//
|
|
// 产品相关
|
|
type ProductServer interface {
|
|
// 获取产品列表
|
|
ItemFetch(context.Context, *MallFetchRequest) (*ListReply, error)
|
|
// 获取产品详情
|
|
ItemDetail(context.Context, *IdentRequest) (*ProductItem, error)
|
|
// 通过产品序列获取产品详情
|
|
ItemDetailBySerial(context.Context, *StoreSerialRequest) (*ListReply, error)
|
|
// 通过规格编号获取产品详情
|
|
ItemDetailBySpec(context.Context, *DetailBySpecRequest) (*ListItem, error)
|
|
// 添加产品
|
|
ItemCreate(context.Context, *ProductItem) (*IdentityStatusReply, error)
|
|
// 删除产品
|
|
ItemDelete(context.Context, *IdentRequest) (*IdentityStatusReply, error)
|
|
// 发布/取消发布 产品
|
|
ItemModify(context.Context, *ModifyRequest) (*IdentityStatusReply, error)
|
|
// 批量操作
|
|
ItemBatchOp(context.Context, *OpRequest) (*IdentityStatusReply, error)
|
|
// 产品规格列表
|
|
SpecFetch(context.Context, *MallFetchRequest) (*SpecReply, error)
|
|
// 添加产品规格
|
|
SpecCreate(context.Context, *SpecItem) (*IdentityStatusReply, error)
|
|
// 修改产品规格
|
|
SpecModify(context.Context, *SpecItem) (*IdentityStatusReply, error)
|
|
// 删除产品规格
|
|
SpecDelete(context.Context, *IdentRequest) (*IdentityStatusReply, error)
|
|
// 产品详情
|
|
SpecDetail(context.Context, *IdentRequest) (*SpecItem, error)
|
|
// 添加产品图片
|
|
PhotoCreate(context.Context, *PhotoItem) (*IdentityStatusReply, error)
|
|
// 删除产品图片
|
|
PhotoDelete(context.Context, *IdentRequest) (*IdentityStatusReply, error)
|
|
// 产品图片列表
|
|
PhotoList(context.Context, *PhotoItem) (*PhotoReply, error)
|
|
// 产品的评论列表
|
|
CommentFetch(context.Context, *MallFetchRequest) (*CommentListReply, error)
|
|
// 评论
|
|
CommentCreate(context.Context, *CommentItem) (*IdentityStatusReply, error)
|
|
// 回复评论
|
|
CommentRe(context.Context, *CommentItem) (*IdentityStatusReply, error)
|
|
// 删除评论
|
|
CommentDelete(context.Context, *IdentRequest) (*IdentityStatusReply, error)
|
|
// 修改评论
|
|
CommentModify(context.Context, *CommentItem) (*IdentityStatusReply, error)
|
|
}
|
|
|
|
// UnimplementedProductServer should 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) ItemFetch(context.Context, *MallFetchRequest) (*ListReply, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ItemFetch not implemented")
|
|
}
|
|
func (UnimplementedProductServer) ItemDetail(context.Context, *IdentRequest) (*ProductItem, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ItemDetail not implemented")
|
|
}
|
|
func (UnimplementedProductServer) ItemDetailBySerial(context.Context, *StoreSerialRequest) (*ListReply, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ItemDetailBySerial not implemented")
|
|
}
|
|
func (UnimplementedProductServer) ItemDetailBySpec(context.Context, *DetailBySpecRequest) (*ListItem, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ItemDetailBySpec not implemented")
|
|
}
|
|
func (UnimplementedProductServer) ItemCreate(context.Context, *ProductItem) (*IdentityStatusReply, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ItemCreate not implemented")
|
|
}
|
|
func (UnimplementedProductServer) ItemDelete(context.Context, *IdentRequest) (*IdentityStatusReply, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ItemDelete not implemented")
|
|
}
|
|
func (UnimplementedProductServer) ItemModify(context.Context, *ModifyRequest) (*IdentityStatusReply, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ItemModify not implemented")
|
|
}
|
|
func (UnimplementedProductServer) ItemBatchOp(context.Context, *OpRequest) (*IdentityStatusReply, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ItemBatchOp not implemented")
|
|
}
|
|
func (UnimplementedProductServer) SpecFetch(context.Context, *MallFetchRequest) (*SpecReply, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SpecFetch not implemented")
|
|
}
|
|
func (UnimplementedProductServer) SpecCreate(context.Context, *SpecItem) (*IdentityStatusReply, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SpecCreate not implemented")
|
|
}
|
|
func (UnimplementedProductServer) SpecModify(context.Context, *SpecItem) (*IdentityStatusReply, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SpecModify not implemented")
|
|
}
|
|
func (UnimplementedProductServer) SpecDelete(context.Context, *IdentRequest) (*IdentityStatusReply, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SpecDelete not implemented")
|
|
}
|
|
func (UnimplementedProductServer) SpecDetail(context.Context, *IdentRequest) (*SpecItem, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SpecDetail not implemented")
|
|
}
|
|
func (UnimplementedProductServer) PhotoCreate(context.Context, *PhotoItem) (*IdentityStatusReply, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method PhotoCreate not implemented")
|
|
}
|
|
func (UnimplementedProductServer) PhotoDelete(context.Context, *IdentRequest) (*IdentityStatusReply, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method PhotoDelete not implemented")
|
|
}
|
|
func (UnimplementedProductServer) PhotoList(context.Context, *PhotoItem) (*PhotoReply, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method PhotoList not implemented")
|
|
}
|
|
func (UnimplementedProductServer) CommentFetch(context.Context, *MallFetchRequest) (*CommentListReply, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method CommentFetch not implemented")
|
|
}
|
|
func (UnimplementedProductServer) CommentCreate(context.Context, *CommentItem) (*IdentityStatusReply, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method CommentCreate not implemented")
|
|
}
|
|
func (UnimplementedProductServer) CommentRe(context.Context, *CommentItem) (*IdentityStatusReply, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method CommentRe not implemented")
|
|
}
|
|
func (UnimplementedProductServer) CommentDelete(context.Context, *IdentRequest) (*IdentityStatusReply, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method CommentDelete not implemented")
|
|
}
|
|
func (UnimplementedProductServer) CommentModify(context.Context, *CommentItem) (*IdentityStatusReply, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method CommentModify not implemented")
|
|
}
|
|
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_ItemFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(MallFetchRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).ItemFetch(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_ItemFetch_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).ItemFetch(ctx, req.(*MallFetchRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_ItemDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(IdentRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).ItemDetail(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_ItemDetail_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).ItemDetail(ctx, req.(*IdentRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_ItemDetailBySerial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(StoreSerialRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).ItemDetailBySerial(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_ItemDetailBySerial_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).ItemDetailBySerial(ctx, req.(*StoreSerialRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_ItemDetailBySpec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DetailBySpecRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).ItemDetailBySpec(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_ItemDetailBySpec_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).ItemDetailBySpec(ctx, req.(*DetailBySpecRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_ItemCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ProductItem)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).ItemCreate(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_ItemCreate_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).ItemCreate(ctx, req.(*ProductItem))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_ItemDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(IdentRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).ItemDelete(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_ItemDelete_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).ItemDelete(ctx, req.(*IdentRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_ItemModify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ModifyRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).ItemModify(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_ItemModify_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).ItemModify(ctx, req.(*ModifyRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_ItemBatchOp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(OpRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).ItemBatchOp(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_ItemBatchOp_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).ItemBatchOp(ctx, req.(*OpRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_SpecFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(MallFetchRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).SpecFetch(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_SpecFetch_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).SpecFetch(ctx, req.(*MallFetchRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_SpecCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SpecItem)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).SpecCreate(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_SpecCreate_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).SpecCreate(ctx, req.(*SpecItem))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_SpecModify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SpecItem)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).SpecModify(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_SpecModify_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).SpecModify(ctx, req.(*SpecItem))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_SpecDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(IdentRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).SpecDelete(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_SpecDelete_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).SpecDelete(ctx, req.(*IdentRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_SpecDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(IdentRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).SpecDetail(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_SpecDetail_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).SpecDetail(ctx, req.(*IdentRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_PhotoCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PhotoItem)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).PhotoCreate(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_PhotoCreate_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).PhotoCreate(ctx, req.(*PhotoItem))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_PhotoDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(IdentRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).PhotoDelete(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_PhotoDelete_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).PhotoDelete(ctx, req.(*IdentRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_PhotoList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PhotoItem)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).PhotoList(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_PhotoList_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).PhotoList(ctx, req.(*PhotoItem))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_CommentFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(MallFetchRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).CommentFetch(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_CommentFetch_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).CommentFetch(ctx, req.(*MallFetchRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_CommentCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CommentItem)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).CommentCreate(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_CommentCreate_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).CommentCreate(ctx, req.(*CommentItem))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_CommentRe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CommentItem)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).CommentRe(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_CommentRe_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).CommentRe(ctx, req.(*CommentItem))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_CommentDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(IdentRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).CommentDelete(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_CommentDelete_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).CommentDelete(ctx, req.(*IdentRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Product_CommentModify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CommentItem)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProductServer).CommentModify(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Product_CommentModify_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProductServer).CommentModify(ctx, req.(*CommentItem))
|
|
}
|
|
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: "mall.Product",
|
|
HandlerType: (*ProductServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "ItemFetch",
|
|
Handler: _Product_ItemFetch_Handler,
|
|
},
|
|
{
|
|
MethodName: "ItemDetail",
|
|
Handler: _Product_ItemDetail_Handler,
|
|
},
|
|
{
|
|
MethodName: "ItemDetailBySerial",
|
|
Handler: _Product_ItemDetailBySerial_Handler,
|
|
},
|
|
{
|
|
MethodName: "ItemDetailBySpec",
|
|
Handler: _Product_ItemDetailBySpec_Handler,
|
|
},
|
|
{
|
|
MethodName: "ItemCreate",
|
|
Handler: _Product_ItemCreate_Handler,
|
|
},
|
|
{
|
|
MethodName: "ItemDelete",
|
|
Handler: _Product_ItemDelete_Handler,
|
|
},
|
|
{
|
|
MethodName: "ItemModify",
|
|
Handler: _Product_ItemModify_Handler,
|
|
},
|
|
{
|
|
MethodName: "ItemBatchOp",
|
|
Handler: _Product_ItemBatchOp_Handler,
|
|
},
|
|
{
|
|
MethodName: "SpecFetch",
|
|
Handler: _Product_SpecFetch_Handler,
|
|
},
|
|
{
|
|
MethodName: "SpecCreate",
|
|
Handler: _Product_SpecCreate_Handler,
|
|
},
|
|
{
|
|
MethodName: "SpecModify",
|
|
Handler: _Product_SpecModify_Handler,
|
|
},
|
|
{
|
|
MethodName: "SpecDelete",
|
|
Handler: _Product_SpecDelete_Handler,
|
|
},
|
|
{
|
|
MethodName: "SpecDetail",
|
|
Handler: _Product_SpecDetail_Handler,
|
|
},
|
|
{
|
|
MethodName: "PhotoCreate",
|
|
Handler: _Product_PhotoCreate_Handler,
|
|
},
|
|
{
|
|
MethodName: "PhotoDelete",
|
|
Handler: _Product_PhotoDelete_Handler,
|
|
},
|
|
{
|
|
MethodName: "PhotoList",
|
|
Handler: _Product_PhotoList_Handler,
|
|
},
|
|
{
|
|
MethodName: "CommentFetch",
|
|
Handler: _Product_CommentFetch_Handler,
|
|
},
|
|
{
|
|
MethodName: "CommentCreate",
|
|
Handler: _Product_CommentCreate_Handler,
|
|
},
|
|
{
|
|
MethodName: "CommentRe",
|
|
Handler: _Product_CommentRe_Handler,
|
|
},
|
|
{
|
|
MethodName: "CommentDelete",
|
|
Handler: _Product_CommentDelete_Handler,
|
|
},
|
|
{
|
|
MethodName: "CommentModify",
|
|
Handler: _Product_CommentModify_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "module/ec/mall/proto/product.proto",
|
|
}
|