586 lines
20 KiB
Go
586 lines
20 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: sale/sale.proto
|
|
|
|
package sale
|
|
|
|
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 (
|
|
Sale_GroupItems_FullMethodName = "/sale.Sale/GroupItems"
|
|
Sale_GroupCreate_FullMethodName = "/sale.Sale/GroupCreate"
|
|
Sale_GroupNames_FullMethodName = "/sale.Sale/GroupNames"
|
|
Sale_Types_FullMethodName = "/sale.Sale/Types"
|
|
Sale_Names_FullMethodName = "/sale.Sale/Names"
|
|
Sale_NamesInternal_FullMethodName = "/sale.Sale/NamesInternal"
|
|
Sale_Create_FullMethodName = "/sale.Sale/Create"
|
|
Sale_Edit_FullMethodName = "/sale.Sale/Edit"
|
|
Sale_Info_FullMethodName = "/sale.Sale/Info"
|
|
Sale_Items_FullMethodName = "/sale.Sale/Items"
|
|
Sale_Status_FullMethodName = "/sale.Sale/Status"
|
|
Sale_InfoInternal_FullMethodName = "/sale.Sale/InfoInternal"
|
|
Sale_NamesByIds_FullMethodName = "/sale.Sale/NamesByIds"
|
|
)
|
|
|
|
// SaleClient is the client API for Sale 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 SaleClient interface {
|
|
// 销售分组
|
|
GroupItems(ctx context.Context, in *GroupItemsReq, opts ...grpc.CallOption) (*Response, error)
|
|
GroupCreate(ctx context.Context, in *GroupCreateReq, opts ...grpc.CallOption) (*Response, error)
|
|
GroupNames(ctx context.Context, in *GroupEmptyReq, opts ...grpc.CallOption) (*Response, error)
|
|
// 销售管理
|
|
Types(ctx context.Context, in *GroupEmptyReq, opts ...grpc.CallOption) (*Response, error)
|
|
Names(ctx context.Context, in *NamesReq, opts ...grpc.CallOption) (*Response, error)
|
|
NamesInternal(ctx context.Context, in *NamesReq, opts ...grpc.CallOption) (*NamesData, error)
|
|
Create(ctx context.Context, in *CreateReq, opts ...grpc.CallOption) (*Response, error)
|
|
Edit(ctx context.Context, in *EditReq, 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)
|
|
Status(ctx context.Context, in *StatusReq, opts ...grpc.CallOption) (*Response, error)
|
|
// 销售详情
|
|
InfoInternal(ctx context.Context, in *InfoReq, opts ...grpc.CallOption) (*InfoData, error)
|
|
// 按 id 批量查销售 id+name(内部)
|
|
NamesByIds(ctx context.Context, in *NamesByIdsReq, opts ...grpc.CallOption) (*NamesByIdsData, error)
|
|
}
|
|
|
|
type saleClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewSaleClient(cc grpc.ClientConnInterface) SaleClient {
|
|
return &saleClient{cc}
|
|
}
|
|
|
|
func (c *saleClient) GroupItems(ctx context.Context, in *GroupItemsReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Sale_GroupItems_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *saleClient) GroupCreate(ctx context.Context, in *GroupCreateReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Sale_GroupCreate_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *saleClient) GroupNames(ctx context.Context, in *GroupEmptyReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Sale_GroupNames_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *saleClient) Types(ctx context.Context, in *GroupEmptyReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Sale_Types_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *saleClient) 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, Sale_Names_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *saleClient) NamesInternal(ctx context.Context, in *NamesReq, opts ...grpc.CallOption) (*NamesData, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(NamesData)
|
|
err := c.cc.Invoke(ctx, Sale_NamesInternal_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *saleClient) 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, Sale_Create_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *saleClient) Edit(ctx context.Context, in *EditReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Sale_Edit_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *saleClient) 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, Sale_Info_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *saleClient) 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, Sale_Items_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *saleClient) 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, Sale_Status_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *saleClient) InfoInternal(ctx context.Context, in *InfoReq, opts ...grpc.CallOption) (*InfoData, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(InfoData)
|
|
err := c.cc.Invoke(ctx, Sale_InfoInternal_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *saleClient) NamesByIds(ctx context.Context, in *NamesByIdsReq, opts ...grpc.CallOption) (*NamesByIdsData, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(NamesByIdsData)
|
|
err := c.cc.Invoke(ctx, Sale_NamesByIds_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// SaleServer is the server API for Sale service.
|
|
// All implementations must embed UnimplementedSaleServer
|
|
// for forward compatibility.
|
|
type SaleServer interface {
|
|
// 销售分组
|
|
GroupItems(context.Context, *GroupItemsReq) (*Response, error)
|
|
GroupCreate(context.Context, *GroupCreateReq) (*Response, error)
|
|
GroupNames(context.Context, *GroupEmptyReq) (*Response, error)
|
|
// 销售管理
|
|
Types(context.Context, *GroupEmptyReq) (*Response, error)
|
|
Names(context.Context, *NamesReq) (*Response, error)
|
|
NamesInternal(context.Context, *NamesReq) (*NamesData, error)
|
|
Create(context.Context, *CreateReq) (*Response, error)
|
|
Edit(context.Context, *EditReq) (*Response, error)
|
|
Info(context.Context, *InfoReq) (*Response, error)
|
|
Items(context.Context, *ItemsReq) (*Response, error)
|
|
Status(context.Context, *StatusReq) (*Response, error)
|
|
// 销售详情
|
|
InfoInternal(context.Context, *InfoReq) (*InfoData, error)
|
|
// 按 id 批量查销售 id+name(内部)
|
|
NamesByIds(context.Context, *NamesByIdsReq) (*NamesByIdsData, error)
|
|
mustEmbedUnimplementedSaleServer()
|
|
}
|
|
|
|
// UnimplementedSaleServer 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 UnimplementedSaleServer struct{}
|
|
|
|
func (UnimplementedSaleServer) GroupItems(context.Context, *GroupItemsReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GroupItems not implemented")
|
|
}
|
|
func (UnimplementedSaleServer) GroupCreate(context.Context, *GroupCreateReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GroupCreate not implemented")
|
|
}
|
|
func (UnimplementedSaleServer) GroupNames(context.Context, *GroupEmptyReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GroupNames not implemented")
|
|
}
|
|
func (UnimplementedSaleServer) Types(context.Context, *GroupEmptyReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method Types not implemented")
|
|
}
|
|
func (UnimplementedSaleServer) Names(context.Context, *NamesReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method Names not implemented")
|
|
}
|
|
func (UnimplementedSaleServer) NamesInternal(context.Context, *NamesReq) (*NamesData, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method NamesInternal not implemented")
|
|
}
|
|
func (UnimplementedSaleServer) Create(context.Context, *CreateReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method Create not implemented")
|
|
}
|
|
func (UnimplementedSaleServer) Edit(context.Context, *EditReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method Edit not implemented")
|
|
}
|
|
func (UnimplementedSaleServer) Info(context.Context, *InfoReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method Info not implemented")
|
|
}
|
|
func (UnimplementedSaleServer) Items(context.Context, *ItemsReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method Items not implemented")
|
|
}
|
|
func (UnimplementedSaleServer) Status(context.Context, *StatusReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method Status not implemented")
|
|
}
|
|
func (UnimplementedSaleServer) InfoInternal(context.Context, *InfoReq) (*InfoData, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method InfoInternal not implemented")
|
|
}
|
|
func (UnimplementedSaleServer) NamesByIds(context.Context, *NamesByIdsReq) (*NamesByIdsData, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method NamesByIds not implemented")
|
|
}
|
|
func (UnimplementedSaleServer) mustEmbedUnimplementedSaleServer() {}
|
|
func (UnimplementedSaleServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeSaleServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to SaleServer will
|
|
// result in compilation errors.
|
|
type UnsafeSaleServer interface {
|
|
mustEmbedUnimplementedSaleServer()
|
|
}
|
|
|
|
func RegisterSaleServer(s grpc.ServiceRegistrar, srv SaleServer) {
|
|
// If the following call panics, it indicates UnimplementedSaleServer 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(&Sale_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Sale_GroupItems_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GroupItemsReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SaleServer).GroupItems(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Sale_GroupItems_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SaleServer).GroupItems(ctx, req.(*GroupItemsReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Sale_GroupCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GroupCreateReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SaleServer).GroupCreate(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Sale_GroupCreate_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SaleServer).GroupCreate(ctx, req.(*GroupCreateReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Sale_GroupNames_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GroupEmptyReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SaleServer).GroupNames(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Sale_GroupNames_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SaleServer).GroupNames(ctx, req.(*GroupEmptyReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Sale_Types_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GroupEmptyReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SaleServer).Types(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Sale_Types_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SaleServer).Types(ctx, req.(*GroupEmptyReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Sale_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.(SaleServer).Names(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Sale_Names_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SaleServer).Names(ctx, req.(*NamesReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Sale_NamesInternal_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.(SaleServer).NamesInternal(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Sale_NamesInternal_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SaleServer).NamesInternal(ctx, req.(*NamesReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Sale_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.(SaleServer).Create(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Sale_Create_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SaleServer).Create(ctx, req.(*CreateReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Sale_Edit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(EditReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SaleServer).Edit(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Sale_Edit_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SaleServer).Edit(ctx, req.(*EditReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Sale_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.(SaleServer).Info(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Sale_Info_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SaleServer).Info(ctx, req.(*InfoReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Sale_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.(SaleServer).Items(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Sale_Items_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SaleServer).Items(ctx, req.(*ItemsReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Sale_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.(SaleServer).Status(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Sale_Status_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SaleServer).Status(ctx, req.(*StatusReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Sale_InfoInternal_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.(SaleServer).InfoInternal(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Sale_InfoInternal_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SaleServer).InfoInternal(ctx, req.(*InfoReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Sale_NamesByIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(NamesByIdsReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SaleServer).NamesByIds(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Sale_NamesByIds_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SaleServer).NamesByIds(ctx, req.(*NamesByIdsReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Sale_ServiceDesc is the grpc.ServiceDesc for Sale service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Sale_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "sale.Sale",
|
|
HandlerType: (*SaleServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GroupItems",
|
|
Handler: _Sale_GroupItems_Handler,
|
|
},
|
|
{
|
|
MethodName: "GroupCreate",
|
|
Handler: _Sale_GroupCreate_Handler,
|
|
},
|
|
{
|
|
MethodName: "GroupNames",
|
|
Handler: _Sale_GroupNames_Handler,
|
|
},
|
|
{
|
|
MethodName: "Types",
|
|
Handler: _Sale_Types_Handler,
|
|
},
|
|
{
|
|
MethodName: "Names",
|
|
Handler: _Sale_Names_Handler,
|
|
},
|
|
{
|
|
MethodName: "NamesInternal",
|
|
Handler: _Sale_NamesInternal_Handler,
|
|
},
|
|
{
|
|
MethodName: "Create",
|
|
Handler: _Sale_Create_Handler,
|
|
},
|
|
{
|
|
MethodName: "Edit",
|
|
Handler: _Sale_Edit_Handler,
|
|
},
|
|
{
|
|
MethodName: "Info",
|
|
Handler: _Sale_Info_Handler,
|
|
},
|
|
{
|
|
MethodName: "Items",
|
|
Handler: _Sale_Items_Handler,
|
|
},
|
|
{
|
|
MethodName: "Status",
|
|
Handler: _Sale_Status_Handler,
|
|
},
|
|
{
|
|
MethodName: "InfoInternal",
|
|
Handler: _Sale_InfoInternal_Handler,
|
|
},
|
|
{
|
|
MethodName: "NamesByIds",
|
|
Handler: _Sale_NamesByIds_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "sale/sale.proto",
|
|
}
|