|
|
|
@ -11,6 +11,10 @@
|
|
|
|
|
package proto
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
context "context"
|
|
|
|
|
grpc "google.golang.org/grpc"
|
|
|
|
|
codes "google.golang.org/grpc/codes"
|
|
|
|
|
status "google.golang.org/grpc/status"
|
|
|
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
|
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
|
|
|
reflect "reflect"
|
|
|
|
@ -854,8 +858,13 @@ var file_product_proto_rawDesc = []byte{
|
|
|
|
|
0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x12, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50,
|
|
|
|
|
0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70,
|
|
|
|
|
0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52,
|
|
|
|
|
0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x3b, 0x70, 0x72, 0x6f, 0x74,
|
|
|
|
|
0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
|
|
|
0x65, 0x73, 0x70, 0x22, 0x00, 0x32, 0x52, 0x0a, 0x0d, 0x53, 0x68, 0x6f, 0x77, 0x44, 0x65, 0x74,
|
|
|
|
|
0x61, 0x69, 0x6c, 0x53, 0x6b, 0x75, 0x12, 0x41, 0x0a, 0x0d, 0x53, 0x68, 0x6f, 0x77, 0x44, 0x65,
|
|
|
|
|
0x74, 0x61, 0x69, 0x6c, 0x53, 0x6b, 0x75, 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
|
|
|
|
|
0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71,
|
|
|
|
|
0x1a, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
|
|
|
|
|
0x53, 0x6b, 0x75, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x3b,
|
|
|
|
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
@ -891,11 +900,13 @@ var file_product_proto_depIdxs = []int32{
|
|
|
|
|
1, // 4: proto.Page.Page:input_type -> proto.PageReq
|
|
|
|
|
4, // 5: proto.ShowProductDetail.ShowProductDetail:input_type -> proto.ProductDetailReq
|
|
|
|
|
7, // 6: proto.ShowProductSku.ShowProductSku:input_type -> proto.ProductSkuReq
|
|
|
|
|
2, // 7: proto.Page.Page:output_type -> proto.PageResp
|
|
|
|
|
5, // 8: proto.ShowProductDetail.ShowProductDetail:output_type -> proto.ProductDetailResp
|
|
|
|
|
8, // 9: proto.ShowProductSku.ShowProductSku:output_type -> proto.ProductSkuResp
|
|
|
|
|
7, // [7:10] is the sub-list for method output_type
|
|
|
|
|
4, // [4:7] is the sub-list for method input_type
|
|
|
|
|
4, // 7: proto.ShowDetailSku.ShowDetailSku:input_type -> proto.ProductDetailReq
|
|
|
|
|
2, // 8: proto.Page.Page:output_type -> proto.PageResp
|
|
|
|
|
5, // 9: proto.ShowProductDetail.ShowProductDetail:output_type -> proto.ProductDetailResp
|
|
|
|
|
8, // 10: proto.ShowProductSku.ShowProductSku:output_type -> proto.ProductSkuResp
|
|
|
|
|
8, // 11: proto.ShowDetailSku.ShowDetailSku:output_type -> proto.ProductSkuResp
|
|
|
|
|
8, // [8:12] is the sub-list for method output_type
|
|
|
|
|
4, // [4:8] is the sub-list for method input_type
|
|
|
|
|
4, // [4:4] is the sub-list for extension type_name
|
|
|
|
|
4, // [4:4] is the sub-list for extension extendee
|
|
|
|
|
0, // [0:4] is the sub-list for field type_name
|
|
|
|
@ -1024,7 +1035,7 @@ func file_product_proto_init() {
|
|
|
|
|
NumEnums: 0,
|
|
|
|
|
NumMessages: 10,
|
|
|
|
|
NumExtensions: 0,
|
|
|
|
|
NumServices: 3,
|
|
|
|
|
NumServices: 4,
|
|
|
|
|
},
|
|
|
|
|
GoTypes: file_product_proto_goTypes,
|
|
|
|
|
DependencyIndexes: file_product_proto_depIdxs,
|
|
|
|
@ -1035,3 +1046,307 @@ func file_product_proto_init() {
|
|
|
|
|
file_product_proto_goTypes = nil
|
|
|
|
|
file_product_proto_depIdxs = nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
|
var _ context.Context
|
|
|
|
|
var _ grpc.ClientConnInterface
|
|
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
|
// is compatible with the grpc package it is being compiled against.
|
|
|
|
|
const _ = grpc.SupportPackageIsVersion6
|
|
|
|
|
|
|
|
|
|
// PageClient is the client API for Page service.
|
|
|
|
|
//
|
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
|
|
type PageClient interface {
|
|
|
|
|
// rpc 服务
|
|
|
|
|
Page(ctx context.Context, in *PageReq, opts ...grpc.CallOption) (*PageResp, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type pageClient struct {
|
|
|
|
|
cc grpc.ClientConnInterface
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewPageClient(cc grpc.ClientConnInterface) PageClient {
|
|
|
|
|
return &pageClient{cc}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *pageClient) Page(ctx context.Context, in *PageReq, opts ...grpc.CallOption) (*PageResp, error) {
|
|
|
|
|
out := new(PageResp)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/proto.Page/Page", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// PageServer is the server API for Page service.
|
|
|
|
|
type PageServer interface {
|
|
|
|
|
// rpc 服务
|
|
|
|
|
Page(context.Context, *PageReq) (*PageResp, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// UnimplementedPageServer can be embedded to have forward compatible implementations.
|
|
|
|
|
type UnimplementedPageServer struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (*UnimplementedPageServer) Page(context.Context, *PageReq) (*PageResp, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Page not implemented")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func RegisterPageServer(s *grpc.Server, srv PageServer) {
|
|
|
|
|
s.RegisterService(&_Page_serviceDesc, srv)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Page_Page_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(PageReq)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(PageServer).Page(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: "/proto.Page/Page",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(PageServer).Page(ctx, req.(*PageReq))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var _Page_serviceDesc = grpc.ServiceDesc{
|
|
|
|
|
ServiceName: "proto.Page",
|
|
|
|
|
HandlerType: (*PageServer)(nil),
|
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
|
{
|
|
|
|
|
MethodName: "Page",
|
|
|
|
|
Handler: _Page_Page_Handler,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
|
|
Metadata: "product.proto",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ShowProductDetailClient is the client API for ShowProductDetail service.
|
|
|
|
|
//
|
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
|
|
type ShowProductDetailClient interface {
|
|
|
|
|
// rpc 服务
|
|
|
|
|
ShowProductDetail(ctx context.Context, in *ProductDetailReq, opts ...grpc.CallOption) (*ProductDetailResp, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type showProductDetailClient struct {
|
|
|
|
|
cc grpc.ClientConnInterface
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewShowProductDetailClient(cc grpc.ClientConnInterface) ShowProductDetailClient {
|
|
|
|
|
return &showProductDetailClient{cc}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *showProductDetailClient) ShowProductDetail(ctx context.Context, in *ProductDetailReq, opts ...grpc.CallOption) (*ProductDetailResp, error) {
|
|
|
|
|
out := new(ProductDetailResp)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/proto.ShowProductDetail/ShowProductDetail", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ShowProductDetailServer is the server API for ShowProductDetail service.
|
|
|
|
|
type ShowProductDetailServer interface {
|
|
|
|
|
// rpc 服务
|
|
|
|
|
ShowProductDetail(context.Context, *ProductDetailReq) (*ProductDetailResp, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// UnimplementedShowProductDetailServer can be embedded to have forward compatible implementations.
|
|
|
|
|
type UnimplementedShowProductDetailServer struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (*UnimplementedShowProductDetailServer) ShowProductDetail(context.Context, *ProductDetailReq) (*ProductDetailResp, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method ShowProductDetail not implemented")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func RegisterShowProductDetailServer(s *grpc.Server, srv ShowProductDetailServer) {
|
|
|
|
|
s.RegisterService(&_ShowProductDetail_serviceDesc, srv)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _ShowProductDetail_ShowProductDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(ProductDetailReq)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(ShowProductDetailServer).ShowProductDetail(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: "/proto.ShowProductDetail/ShowProductDetail",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(ShowProductDetailServer).ShowProductDetail(ctx, req.(*ProductDetailReq))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var _ShowProductDetail_serviceDesc = grpc.ServiceDesc{
|
|
|
|
|
ServiceName: "proto.ShowProductDetail",
|
|
|
|
|
HandlerType: (*ShowProductDetailServer)(nil),
|
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
|
{
|
|
|
|
|
MethodName: "ShowProductDetail",
|
|
|
|
|
Handler: _ShowProductDetail_ShowProductDetail_Handler,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
|
|
Metadata: "product.proto",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ShowProductSkuClient is the client API for ShowProductSku service.
|
|
|
|
|
//
|
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
|
|
type ShowProductSkuClient interface {
|
|
|
|
|
// rpc 服务
|
|
|
|
|
ShowProductSku(ctx context.Context, in *ProductSkuReq, opts ...grpc.CallOption) (*ProductSkuResp, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type showProductSkuClient struct {
|
|
|
|
|
cc grpc.ClientConnInterface
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewShowProductSkuClient(cc grpc.ClientConnInterface) ShowProductSkuClient {
|
|
|
|
|
return &showProductSkuClient{cc}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *showProductSkuClient) ShowProductSku(ctx context.Context, in *ProductSkuReq, opts ...grpc.CallOption) (*ProductSkuResp, error) {
|
|
|
|
|
out := new(ProductSkuResp)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/proto.ShowProductSku/ShowProductSku", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ShowProductSkuServer is the server API for ShowProductSku service.
|
|
|
|
|
type ShowProductSkuServer interface {
|
|
|
|
|
// rpc 服务
|
|
|
|
|
ShowProductSku(context.Context, *ProductSkuReq) (*ProductSkuResp, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// UnimplementedShowProductSkuServer can be embedded to have forward compatible implementations.
|
|
|
|
|
type UnimplementedShowProductSkuServer struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (*UnimplementedShowProductSkuServer) ShowProductSku(context.Context, *ProductSkuReq) (*ProductSkuResp, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method ShowProductSku not implemented")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func RegisterShowProductSkuServer(s *grpc.Server, srv ShowProductSkuServer) {
|
|
|
|
|
s.RegisterService(&_ShowProductSku_serviceDesc, srv)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _ShowProductSku_ShowProductSku_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(ProductSkuReq)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(ShowProductSkuServer).ShowProductSku(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: "/proto.ShowProductSku/ShowProductSku",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(ShowProductSkuServer).ShowProductSku(ctx, req.(*ProductSkuReq))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var _ShowProductSku_serviceDesc = grpc.ServiceDesc{
|
|
|
|
|
ServiceName: "proto.ShowProductSku",
|
|
|
|
|
HandlerType: (*ShowProductSkuServer)(nil),
|
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
|
{
|
|
|
|
|
MethodName: "ShowProductSku",
|
|
|
|
|
Handler: _ShowProductSku_ShowProductSku_Handler,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
|
|
Metadata: "product.proto",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ShowDetailSkuClient is the client API for ShowDetailSku service.
|
|
|
|
|
//
|
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
|
|
type ShowDetailSkuClient interface {
|
|
|
|
|
// rpc 服务
|
|
|
|
|
ShowDetailSku(ctx context.Context, in *ProductDetailReq, opts ...grpc.CallOption) (*ProductSkuResp, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type showDetailSkuClient struct {
|
|
|
|
|
cc grpc.ClientConnInterface
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewShowDetailSkuClient(cc grpc.ClientConnInterface) ShowDetailSkuClient {
|
|
|
|
|
return &showDetailSkuClient{cc}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *showDetailSkuClient) ShowDetailSku(ctx context.Context, in *ProductDetailReq, opts ...grpc.CallOption) (*ProductSkuResp, error) {
|
|
|
|
|
out := new(ProductSkuResp)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/proto.ShowDetailSku/ShowDetailSku", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ShowDetailSkuServer is the server API for ShowDetailSku service.
|
|
|
|
|
type ShowDetailSkuServer interface {
|
|
|
|
|
// rpc 服务
|
|
|
|
|
ShowDetailSku(context.Context, *ProductDetailReq) (*ProductSkuResp, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// UnimplementedShowDetailSkuServer can be embedded to have forward compatible implementations.
|
|
|
|
|
type UnimplementedShowDetailSkuServer struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (*UnimplementedShowDetailSkuServer) ShowDetailSku(context.Context, *ProductDetailReq) (*ProductSkuResp, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method ShowDetailSku not implemented")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func RegisterShowDetailSkuServer(s *grpc.Server, srv ShowDetailSkuServer) {
|
|
|
|
|
s.RegisterService(&_ShowDetailSku_serviceDesc, srv)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _ShowDetailSku_ShowDetailSku_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(ProductDetailReq)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(ShowDetailSkuServer).ShowDetailSku(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: "/proto.ShowDetailSku/ShowDetailSku",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(ShowDetailSkuServer).ShowDetailSku(ctx, req.(*ProductDetailReq))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var _ShowDetailSku_serviceDesc = grpc.ServiceDesc{
|
|
|
|
|
ServiceName: "proto.ShowDetailSku",
|
|
|
|
|
HandlerType: (*ShowDetailSkuServer)(nil),
|
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
|
{
|
|
|
|
|
MethodName: "ShowDetailSku",
|
|
|
|
|
Handler: _ShowDetailSku_ShowDetailSku_Handler,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
|
|
Metadata: "product.proto",
|
|
|
|
|
}
|
|
|
|
|